added getParamsMap() for jME3 performance improvements in Technique/DefineList

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@11009 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
experimental
phr00t 11 years ago
parent 623c038f97
commit 988fdd2f9e
  1. 17
      engine/src/core/com/jme3/material/Material.java

@ -435,6 +435,17 @@ public class Material implements CloneableSmartAsset, Cloneable, Savable {
return paramValues.values(); return paramValues.values();
} }
/**
* Returns the ListMap of all parameters set on this material.
*
* @return a ListMap of all parameters set on this material.
*
* @see #setParam(java.lang.String, com.jme3.shader.VarType, java.lang.Object)
*/
public ListMap getParamsMap() {
return paramValues;
}
/** /**
* Check if setting the parameter given the type and name is allowed. * Check if setting the parameter given the type and name is allowed.
* @param type The type that the "set" function is designed to set * @param type The type that the "set" function is designed to set
@ -882,6 +893,12 @@ public class Material implements CloneableSmartAsset, Cloneable, Savable {
// When choosing technique, we choose one that // When choosing technique, we choose one that
// supports all the caps. // supports all the caps.
EnumSet<Caps> rendererCaps = renderManager.getRenderer().getCaps(); EnumSet<Caps> rendererCaps = renderManager.getRenderer().getCaps();
//workaround, always assume we support GLSL100
//some cards just don't report this correctly
if( rendererCaps.contains(Caps.GLSL100) == false )
rendererCaps.add(Caps.GLSL100);
if (tech == null) { if (tech == null) {
if (name.equals("Default")) { if (name.equals("Default")) {

Loading…
Cancel
Save