Example usage for org.lwjgl.opengl ARBVertexProgram glEnableVertexAttribArrayARB

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

Introduction

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

Prototype

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

Source Link

Document

Enables a generic vertex attribute array.

Usage

From source file:com.ardor3d.scene.state.lwjgl.shader.LwjglShaderUtil.java

License:Open Source License

private static void enableVertexAttribute(final ShaderVariable var, final ShaderObjectsStateRecord record) {
    if (!record.enabledAttributes.contains(var)) {
        if (var.getSize() == 1) {
            ARBVertexProgram.glEnableVertexAttribArrayARB(var.variableID);
        } else {/*from  w  w w.j a v  a  2s.c om*/
            for (int i = 0, max = var.getSize(); i < max; i++) {
                ARBVertexProgram.glEnableVertexAttribArrayARB(var.variableID + i);
            }
        }
        record.enabledAttributes.add(var);
    }
}