NAME

cgGLSetParameterPointer - sets a varying parameter with an attribute array

SYNOPSIS

  #include <Cg/cgGL.h>

  void cgGLSetParameterPointer( CGparameter param,
                                GLint fsize,
                                GLenum type,
                                GLsizei stride,
                                const GLvoid * pointer );

PARAMETERS

param

The parameter that will be set.

fsize

The number of coordinates per vertex.

type

The data type of each coordinate. Possible values are GL_UNSIGNED_BYTE, GL_SHORT, GL_INT, GL_FLOAT, and GL_DOUBLE.

stride

The byte offset between consecutive vertices. When stride is 0 the array is assumed to be tightly packed.

pointer

The pointer to the first coordinate in the vertex array.

RETURN VALUES

None.

DESCRIPTION

cgGLSetParameterPointer sets a varying parameter to a given vertex array in the typical OpenGL style. See the OpenGL documentation on the various vertex array functions (e.g. glVertexPointer, glNormalPointer, etc...) for more information.

EXAMPLES

to-be-written

ERRORS

CG_INVALID_PROFILE_ERROR is generated if param's profile is not a supported OpenGL profile.

CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid parameter.

CG_UNSUPPORTED_GL_EXTENSION_ERROR is generated if param required an OpenGL extension that is not available.

CG_INVALID_PARAMETER_ERROR is generated if the parameter fails to set for any other reason.

HISTORY

cgGLSetParameterPointer was introduced in Cg 1.1.

SEE ALSO

cgGLSetParameter