// set our current shader
JoglShaderUtil.useShaderProgram(state._programID, record);
final List<ShaderVariable> attribs = state.getShaderAttributes();
for (int i = attribs.size(); --i >= 0;) {
final ShaderVariable shaderVariable = attribs.get(i);
if (shaderVariable.needsRefresh) {
JoglShaderUtil.updateAttributeLocation(shaderVariable, state._programID);
shaderVariable.needsRefresh = false;
}
JoglShaderUtil.updateShaderAttribute(renderer, shaderVariable, state.isUseAttributeVBO());
}
final List<ShaderVariable> uniforms = state.getShaderUniforms();
for (int i = uniforms.size(); --i >= 0;) {
final ShaderVariable shaderVariable = uniforms.get(i);
if (shaderVariable.needsRefresh) {
JoglShaderUtil.updateUniformLocation(shaderVariable, state._programID);
JoglShaderUtil.updateShaderUniform(shaderVariable);
shaderVariable.needsRefresh = false;
}