cgGLSetParameterPointer
Keywords: cgGLSetParameterPointer, NVIDIA, NVIDIA Cg Toolkit, Cg Toolkit, Shader, Shader Programming, GPU Shader Programming, GPU Program

> ## 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