GLKit Effects Constants Reference

Framework
GLKit/GLKMath.h
Declared in
GLKEffects.h

Overview

GLKit effects implement shaders to perform their calculations. These shaders require vertex data to be provided by your application. All of the effects provided by GLKit use a consistent set of indices to reference vertex data provided by your application. When your application enables a vertex attribute array by calling the glEnableVertexAttribArray function, or specifies the vertex attribute pointer by calling the glVertexAttribPointer function, it uses one of these constants to specify the index parameter.

Constants

Vertex Attribute Indices

Values used as indices in OpenGL code to associate vertex data with an attribute in a named shader effect.

typedef enum {     GLKVertexAttribPosition,
   GLKVertexAttribNormal,
   GLKVertexAttribColor,
   GLKVertexAttribTexCoord0,
   GLKVertexAttribTexCoord1,
} GLKVertexAttrib;
Constants
GLKVertexAttribPosition

This index is used to provide the vertex position to a shader.

Available in iOS 5.0 and later.

Declared in GLKEffects.h.

GLKVertexAttribNormal

This index is used to provide the vertex normal to a shader.

Available in iOS 5.0 and later.

Declared in GLKEffects.h.

GLKVertexAttribColor

This index is used to provide the vertex color to a shader.

Available in iOS 5.0 and later.

Declared in GLKEffects.h.

GLKVertexAttribTexCoord0

This index is used to provide a set of texture coordinates to a shader.

Available in iOS 5.0 and later.

Declared in GLKEffects.h.

GLKVertexAttribTexCoord1

This index is used to provide the second set of texture coordinates to a shader.

Available in iOS 5.0 and later.

Declared in GLKEffects.h.