Added a setFloat() that takes a Float to avoid

auto-boxing in the case where a Float is already
at hand.
experimental
pspeed42 11 years ago
parent 1185d2099b
commit 3cf0e35a17
  1. 11
      jme3-core/src/main/java/com/jme3/material/Material.java

@ -635,6 +635,17 @@ public class Material implements CloneableSmartAsset, Cloneable, Savable {
setParam(name, VarType.Float, value);
}
/**
* Pass a float to the material shader. This version avoids auto-boxing
* if the value is already a Float.
*
* @param name the name of the float defined in the material definition (j3md)
* @param value the float value
*/
public void setFloat(String name, Float value) {
setParam(name, VarType.Float, value);
}
/**
* Pass an int to the material shader.
*

Loading…
Cancel
Save