public class Uniform extends ShaderVariable
Modifier and Type | Field and Description |
---|---|
protected UniformBinding |
binding
Binding to a renderer value, or null if user-defined uniform
|
protected java.nio.FloatBuffer |
multiData
For arrays or matrices, efficient format
that can be sent to GL faster.
|
protected boolean |
setByCurrentMaterial
Used to track which uniforms to clear to avoid
values leaking from other materials that use that shader.
|
protected java.lang.Object |
value
Currently set value of the uniform.
|
protected VarType |
varType
Type of uniform
|
LOC_NOT_DEFINED, LOC_UNKNOWN, location, name, updateNeeded
Constructor and Description |
---|
Uniform() |
Modifier and Type | Method and Description |
---|---|
void |
clearSetByCurrentMaterial() |
void |
clearUpdateNeeded() |
void |
clearValue() |
void |
deleteNativeBuffers() |
boolean |
equals(java.lang.Object obj) |
UniformBinding |
getBinding() |
java.nio.FloatBuffer |
getMultiData() |
java.lang.Object |
getValue() |
VarType |
getVarType() |
int |
hashCode() |
boolean |
isSetByCurrentMaterial() |
boolean |
isUpdateNeeded() |
void |
reset() |
void |
setBinding(UniformBinding binding) |
void |
setValue(VarType type,
java.lang.Object value) |
void |
setVector4InArray(float x,
float y,
float z,
float w,
int index) |
void |
setVector4Length(int length) |
java.lang.String |
toString() |
getLocation, getName, setLocation, setName
protected java.lang.Object value
protected java.nio.FloatBuffer multiData
protected VarType varType
protected UniformBinding binding
protected boolean setByCurrentMaterial
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void setBinding(UniformBinding binding)
public UniformBinding getBinding()
public VarType getVarType()
public java.lang.Object getValue()
public java.nio.FloatBuffer getMultiData()
public boolean isSetByCurrentMaterial()
public void clearSetByCurrentMaterial()
public void clearValue()
public void setValue(VarType type, java.lang.Object value)
public void setVector4Length(int length)
public void setVector4InArray(float x, float y, float z, float w, int index)
public boolean isUpdateNeeded()
public void clearUpdateNeeded()
public void reset()
public void deleteNativeBuffers()