com.jme3.shader
Class Uniform

java.lang.Object
  extended by com.jme3.shader.ShaderVariable
      extended by com.jme3.shader.Uniform

public class Uniform
extends ShaderVariable


Field Summary
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
 
Fields inherited from class com.jme3.shader.ShaderVariable
LOC_NOT_DEFINED, LOC_UNKNOWN, location, name, updateNeeded
 
Constructor Summary
Uniform()
           
 
Method Summary
 void clearSetByCurrentMaterial()
           
 void clearUpdateNeeded()
           
 void clearValue()
           
 UniformBinding getBinding()
           
 java.lang.Object getValue()
           
 VarType getVarType()
           
 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()
           
 
Methods inherited from class com.jme3.shader.ShaderVariable
getLocation, getName, setLocation, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected java.lang.Object value
Currently set value of the uniform.


multiData

protected java.nio.FloatBuffer multiData
For arrays or matrices, efficient format that can be sent to GL faster.


varType

protected VarType varType
Type of uniform


binding

protected UniformBinding binding
Binding to a renderer value, or null if user-defined uniform


setByCurrentMaterial

protected boolean setByCurrentMaterial
Used to track which uniforms to clear to avoid values leaking from other materials that use that shader.

Constructor Detail

Uniform

public Uniform()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setBinding

public void setBinding(UniformBinding binding)

getBinding

public UniformBinding getBinding()

getVarType

public VarType getVarType()

getValue

public java.lang.Object getValue()

isSetByCurrentMaterial

public boolean isSetByCurrentMaterial()

clearSetByCurrentMaterial

public void clearSetByCurrentMaterial()

clearValue

public void clearValue()

setValue

public void setValue(VarType type,
                     java.lang.Object value)

setVector4Length

public void setVector4Length(int length)

setVector4InArray

public void setVector4InArray(float x,
                              float y,
                              float z,
                              float w,
                              int index)

isUpdateNeeded

public boolean isUpdateNeeded()

clearUpdateNeeded

public void clearUpdateNeeded()

reset

public void reset()