> # NAME

> cgGLSetStateMatrixParameter - set the values of a matrix parameter to a matrix in the OpenGL state

> # SYNOPSIS

>       #include <Cg/cgGL.h>

>       void cgGLSetStateMatrixParameter( CGparameter param,
>                                         CGGLenum matrix,
>                                         CGGLenum transform );

> # PARAMETERS

> param

>   The matrix parameter that will be set.

> matrix

>   An enumerant indicating which matrix should be retrieved from the OpenGL state. Must be one of the following :

>   - CG_GL_MODELVIEW_MATRIX
>   - CG_GL_PROJECTION_MATRIX
>   - CG_GL_TEXTURE_MATRIX
>   - CG_GL_MODELVIEW_PROJECTION_MATRIX
> transform

>   An enumerant indicating an optional transformation that may be applied to the matrix before it is set. Must be one of the following :

>   - CG_GL_MATRIX_IDENTITY
>   - CG_GL_MATRIX_TRANSPOSE
>   - CG_GL_MATRIX_INVERSE
>   - CG_GL_MATRIX_INVERSE_TRANSPOSE

> # RETURN VALUES

> None.

> # DESCRIPTION

> cgGLSetStateMatrixParameter sets a matrix parameter to the values retrieved from an OpenGL state matrix. The state matrix to retrieve is indicated by matrix, which may be one of the following :

> - CG_GL_MODELVIEW_MATRIX

> Get the current modelview matrix.

> - CG_GL_PROJECTION_MATRIX

> Get the current projection matrix.

> - CG_GL_TEXTURE_MATRIX

> Get the current texture matrix.

> - CG_GL_MODELVIEW_PROJECTION_MATRIX

> Get the concatenated modelview and projection matrices.

> The transform parameter specifies an optional transformation which will be applied to the retrieved matrix before setting the values in the parameter. transform must be one of the following :

> - CG_GL_MATRIX_IDENTITY

> Don't apply any transform, leaving the matrix as is.

> - CG_GL_MATRIX_TRANSPOSE

> Transpose the matrix.

> - CG_GL_MATRIX_INVERSE

> Invert the matrix.

> - CG_GL_MATRIX_INVERSE_TRANSPOSE

> Transpose and invert the matrix.

> cgGLSetStateMatrixParameter may only be called with a uniform matrix parameter. If the size of the matrix is less than 4x4, the upper left corner of the matrix that fits into the given matrix parameter will be returned.

> # EXAMPLES

> to-be-written

> # ERRORS

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

> CG_NOT_MATRIX_PARAM_ERROR is generated if param is not a matrix parameter.

> CG_INVALID_ENUMERANT_ERROR is generated if either matrix or transform is not one of the allowed enumerant values.

> CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid parameter.

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

> # HISTORY

> cgGLSetStateMatrixParameter was introduced in Cg 1.1.

> # SEE ALSO

> cgGLSetMatrixParameter, cgGLGetMatrixParameter