com.metsci.glimpse.gl.attribute
Enum GLVertexAttribute

java.lang.Object
  extended by java.lang.Enum<GLVertexAttribute>
      extended by com.metsci.glimpse.gl.attribute.GLVertexAttribute
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<GLVertexAttribute>

public enum GLVertexAttribute
extends java.lang.Enum<GLVertexAttribute>

According to NVIDIA: "GLSL attempts to eliminate aliasing of vertex attributes but this is integral to NVIDIA's hardware approach and necessary for maintaining compatibility with existing OpenGL applications that NVIDIA customers rely on. NVIDIA's GLSL implementation therefore does not allow built-in vertex attributes to collide with a generic vertex attributes that is assigned to a particular vertex attribute index with glBindAttribLocation. For example, you should not use gl_Normal (a built-in vertex attribute) and also use glBindAttribLocation to bind a generic vertex attribute named "whatever" to vertex attribute index 2 because gl_Normal aliases to index 2." gl_Vertex 0 gl_Normal 2 gl_Color 3 gl_SecondaryColor 4 gl_FogCoord 5 gl_MultiTexCoord0 8 gl_MultiTexCoord1 9 gl_MultiTexCoord2 10 gl_MultiTexCoord3 11 gl_MultiTexCoord4 12 gl_MultiTexCoord5 13 gl_MultiTexCoord6 14 gl_MultiTexCoord7 15 (source: http://developer.download.nvidia.com/opengl/glsl/glsl_release_notes.pdf)


Enum Constant Summary
ATTRIB_COLOR_3D
           
ATTRIB_COLOR_4D
           
ATTRIB_NORMAL
           
ATTRIB_POSITION_1D
           
ATTRIB_POSITION_2D
           
ATTRIB_POSITION_3D
           
ATTRIB_POSITION_4D
           
ATTRIB_TEXCOORD_1D
           
ATTRIB_TEXCOORD_2D
           
ATTRIB_TEXCOORD_3D
           
ATTRIB_TEXCOORD_4D
           
 
Field Summary
 int length
           
 
Method Summary
 void bind(javax.media.opengl.GL gl, int stride, int offset)
           
static void bind(javax.media.opengl.GL gl, int index, int length, int stride, int offset)
           
 void unbind(javax.media.opengl.GL gl)
           
static void unbind(javax.media.opengl.GL gl, int index)
           
static GLVertexAttribute valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static GLVertexAttribute[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ATTRIB_POSITION_1D

public static final GLVertexAttribute ATTRIB_POSITION_1D

ATTRIB_POSITION_2D

public static final GLVertexAttribute ATTRIB_POSITION_2D

ATTRIB_POSITION_3D

public static final GLVertexAttribute ATTRIB_POSITION_3D

ATTRIB_POSITION_4D

public static final GLVertexAttribute ATTRIB_POSITION_4D

ATTRIB_COLOR_3D

public static final GLVertexAttribute ATTRIB_COLOR_3D

ATTRIB_COLOR_4D

public static final GLVertexAttribute ATTRIB_COLOR_4D

ATTRIB_NORMAL

public static final GLVertexAttribute ATTRIB_NORMAL

ATTRIB_TEXCOORD_1D

public static final GLVertexAttribute ATTRIB_TEXCOORD_1D

ATTRIB_TEXCOORD_2D

public static final GLVertexAttribute ATTRIB_TEXCOORD_2D

ATTRIB_TEXCOORD_3D

public static final GLVertexAttribute ATTRIB_TEXCOORD_3D

ATTRIB_TEXCOORD_4D

public static final GLVertexAttribute ATTRIB_TEXCOORD_4D
Field Detail

length

public final int length
Method Detail

values

public static GLVertexAttribute[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (GLVertexAttribute c : GLVertexAttribute.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static GLVertexAttribute valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

bind

public void bind(javax.media.opengl.GL gl,
                 int stride,
                 int offset)

unbind

public void unbind(javax.media.opengl.GL gl)

bind

public static void bind(javax.media.opengl.GL gl,
                        int index,
                        int length,
                        int stride,
                        int offset)

unbind

public static void unbind(javax.media.opengl.GL gl,
                          int index)


Copyright © 2012 Metron, Inc.. All Rights Reserved.