Example usage for org.lwjgl.opengl ARBVertexProgram glDisableVertexAttribArrayARB

List of usage examples for org.lwjgl.opengl ARBVertexProgram glDisableVertexAttribArrayARB

Introduction

In this page you can find the example usage for org.lwjgl.opengl ARBVertexProgram glDisableVertexAttribArrayARB.

Prototype

public static void glDisableVertexAttribArrayARB(@NativeType("GLuint") int index) 

Source Link

Document

Disables a generic vertex attribute array.

Usage

From source file:com.ardor3d.scene.state.lwjgl.LwjglShaderObjectsStateUtil.java

License:Open Source License

private static void clearEnabledAttributes(final ShaderObjectsStateRecord record) {
    // go through and disable any enabled attributes
    if (!record.enabledAttributes.isEmpty()) {
        for (int i = 0, maxI = record.enabledAttributes.size(); i < maxI; i++) {
            final ShaderVariable var = record.enabledAttributes.get(i);
            if (var.getSize() == 1) {
                ARBVertexProgram.glDisableVertexAttribArrayARB(var.variableID);
            } else {
                for (int j = 0, maxJ = var.getSize(); j < maxJ; j++) {
                    ARBVertexProgram.glDisableVertexAttribArrayARB(var.variableID + j);
                }/* w w w.j  a va2 s  .  c o  m*/
            }
        }
        record.enabledAttributes.clear();
    }
}