NAME
cgGLSetStateMatrixParameter - sets the value 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 parameter that will be set.
- matrix
An enumerant indicating which matrix should be retrieved from the OpenGL state. It may be any one of :
- CG_GL_MODELVIEW_MATRIX
The current modelview matrix.
- CG_GL_PROJECTION_MATRIX
The current projection matrix.
- CG_GL_TEXTURE_MATRIX
The current texture matrix.
- CG_GL_MODELVIEW_PROJECTION_MATRIX
The concatenated modelview and projection matrices.
- transform
An optional transformation that may be applied to the OpenGL state matrix before it is set. The enumerants may be any one of :
- CG_GL_MATRIX_IDENTITY
Doesn't apply any transform leaving the matrix as is.
- CG_GL_MATRIX_TRANSPOSE
Transposes the matrix.
- CG_GL_MATRIX_INVERSE
Inverts the matrix.
- CG_GL_MATRIX_INVERSE_TRANSPOSE
Transforms and inverts the matrix.
RETURN VALUES
None.
DESCRIPTION
cgGLSetStateMatrixParameter retrieves matrices from the OpenGL state and sets a matrix parameter to the matrix. The matrix may optionally be transformed before it is set via the transform parameter.
cgGLSetStateMatrixParameter may only be called with any 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 any of the enumerant parameters to cgGLSetStateMatrixParameter are invalid.
CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid parameter handle.
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