Added a setFloat() that takes a Float to avoid

auto-boxing in the case where a Float is already
at hand.
This commit is contained in:
pspeed42 2014-08-12 03:54:19 -04:00
parent 1185d2099b
commit 3cf0e35a17

View File

@ -635,6 +635,17 @@ public class Material implements CloneableSmartAsset, Cloneable, Savable {
setParam(name, VarType.Float, value); 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. * Pass an int to the material shader.
* *