Class JoglShaderUtil

java.lang.Object
com.ardor3d.scene.state.jogl.shader.JoglShaderUtil

public abstract class JoglShaderUtil extends Object
Utility class for updating shadervariables(uniforms and attributes)
  • Constructor Details

    • JoglShaderUtil

      public JoglShaderUtil()
  • Method Details

    • updateShaderUniform

      public static void updateShaderUniform(ShaderVariable shaderVariable)
      Updates a uniform shadervariable.
      Parameters:
      shaderVariable - variable to update
    • updateUniformLocation

      public static void updateUniformLocation(ShaderVariable variable, int programID)
      Update variableID for uniform shadervariable if needed.
      Parameters:
      variable - shadervaribale to update ID on
      programID - shader program context ID
    • updateAttributeLocation

      public static void updateAttributeLocation(ShaderVariable variable, int programID)
      Update variableID for attribute shadervariable if needed.
      Parameters:
      variable - shadervaribale to update ID on
      programID - shader program context ID
    • updateShaderAttribute

      public static void updateShaderAttribute(Renderer renderer, ShaderVariable shaderVariable, boolean useVBO)
      Updates an vertex attribute pointer.
      Parameters:
      renderer - the current renderer
      shaderVariable - variable to update
      useVBO - if true, we'll use VBO for the attributes, if false we'll use arrays.
    • useShaderProgram

      public static void useShaderProgram(int id, ShaderObjectsStateRecord record)