Class Uniform


public class Uniform extends ShaderVariable
  • Field Details

    • value

      protected Object value
      Currently set value of the uniform.
    • multiData

      protected 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 Details

    • Uniform

      public Uniform()
  • Method Details

    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setBinding

      public void setBinding(UniformBinding binding)
    • getBinding

      public UniformBinding getBinding()
    • getVarType

      public VarType getVarType()
    • getValue

      public Object getValue()
    • getMultiData

      public FloatBuffer getMultiData()
    • isSetByCurrentMaterial

      public boolean isSetByCurrentMaterial()
    • clearSetByCurrentMaterial

      public void clearSetByCurrentMaterial()
    • clearValue

      public void clearValue()
    • setValue

      public void setValue(VarType type, 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()
    • deleteNativeBuffers

      public void deleteNativeBuffers()