added getParamsMap() for jME3 performance improvements in Technique/DefineList
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@11009 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
623c038f97
commit
988fdd2f9e
@ -434,6 +434,17 @@ public class Material implements CloneableSmartAsset, Cloneable, Savable {
|
||||
public Collection<MatParam> getParams() {
|
||||
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.
|
||||
@ -882,6 +893,12 @@ public class Material implements CloneableSmartAsset, Cloneable, Savable {
|
||||
// When choosing technique, we choose one that
|
||||
// supports all the caps.
|
||||
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 (name.equals("Default")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user