Class JoglShaderUtil
java.lang.Object
com.ardor3d.scene.state.jogl.shader.JoglShaderUtil
Utility class for updating shadervariables(uniforms and attributes)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
updateAttributeLocation
(ShaderVariable variable, int programID) Update variableID for attribute shadervariable if needed.static void
updateShaderAttribute
(Renderer renderer, ShaderVariable shaderVariable, boolean useVBO) Updates an vertex attribute pointer.static void
updateShaderUniform
(ShaderVariable shaderVariable) Updates a uniform shadervariable.static void
updateUniformLocation
(ShaderVariable variable, int programID) Update variableID for uniform shadervariable if needed.static void
useShaderProgram
(int id, ShaderObjectsStateRecord record)
-
Constructor Details
-
JoglShaderUtil
public JoglShaderUtil()
-
-
Method Details
-
updateShaderUniform
Updates a uniform shadervariable.- Parameters:
shaderVariable
- variable to update
-
updateUniformLocation
Update variableID for uniform shadervariable if needed.- Parameters:
variable
- shadervaribale to update ID onprogramID
- shader program context ID
-
updateAttributeLocation
Update variableID for attribute shadervariable if needed.- Parameters:
variable
- shadervaribale to update ID onprogramID
- shader program context ID
-
updateShaderAttribute
public static void updateShaderAttribute(Renderer renderer, ShaderVariable shaderVariable, boolean useVBO) Updates an vertex attribute pointer.- Parameters:
renderer
- the current renderershaderVariable
- variable to updateuseVBO
- if true, we'll use VBO for the attributes, if false we'll use arrays.
-
useShaderProgram
-