* Material.setParam() now calls setTextureParam() instead of messing up internal state if the type is a texture

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10209 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
sha..RD 12 years ago
parent 9eb9463261
commit 84183ad154
  1. 4
      engine/src/core/com/jme3/material/Material.java

@ -459,6 +459,9 @@ public class Material implements CloneableSmartAsset, Cloneable, Savable {
public void setParam(String name, VarType type, Object value) {
checkSetParam(type, name);
if (type.isTextureType()) {
setTextureParam(name, type, (Texture)value);
} else {
MatParam val = getParam(name);
if (val == null) {
MatParam paramDef = def.getMaterialParam(name);
@ -471,6 +474,7 @@ public class Material implements CloneableSmartAsset, Cloneable, Savable {
technique.notifyParamChanged(name, type, value);
}
}
}
/**
* Clear a parameter from this material. The parameter must exist

Loading…
Cancel
Save