Cg OpenGL Runtime API cgGLSetParameter(3)
NAME
cgGLSetParameter - set the values of a scalar or vector
parameter
SYNOPSIS
#include
/* TYPE is float or double */
void cgGLSetParameter1{fd}( CGparameter param,
TYPE x );
void cgGLSetParameter2{fd}( CGparameter param,
TYPE x,
TYPE y );
void cgGLSetParameter3{fd}( CGparameter param,
TYPE x,
TYPE y,
TYPE z );
void cgGLSetParameter4{fd}( CGparameter param,
TYPE x,
TYPE y,
TYPE z,
TYPE w );
void cgGLSetParameter{1234}{fd}v( CGparameter param,
const TYPE * v );
PARAMETERS
param The parameter that will be set.
x, y, z, and w
The values used to set the parameter.
v An array of values used to set the parameter for the
array versions of the set functions.
RETURN VALUES
None.
DESCRIPTION
The cgGLSetParameter functions set the value of a scalar or
vector parameter.
The function takes either 1, 2, 3, or 4 values depending on
which version is used. If more values are passed in than
the parameter requires, the extra values will be ignored.
Cg Toolkit 2.1 Last change: 1
Cg OpenGL Runtime API cgGLSetParameter(3)
There are versions of each function that take either float
or double values signified by f or d in the function name.
The functions with v at the end of their names take an array
of values instead of explicit parameters.
The cgGLSetParameter functions may be called with either
uniform or varying parameters. When called with a varying
parameter, the appropriate immediate mode OpenGL entry point
will be called. However, the cgGLGetParameter functions
will only work with uniform parameters.
Note:::: Previous releases of Cg allowed you to store more
values in a parameter than indicated by the parameter's
type. For example, one could use cgGLSetParameter4f to store
four values into a parameter of type CGFLOAT (not
CGFLOAT4). All four values could later be retrieved using a
get call which requested more than one value. However, this
feature conflicts with the GLSL approach and also leads to
issues with parameters mapped into BUFERS. Therefore,
beginning with Cg 2.0 any components beyond the number
indicated by the parameter type are ignored.
EXAMPLES
to-be-written
ERORS
CGINVALIDPROFILEROR is generated if param's profile is
not a supported OpenGL profile.
CGINVALIDPARAMHANDLEROR is generated if param is not a
valid parameter.
CGINVALIDPARAMETEREROR is generated if the parameter
fails to set for any other reason.
HISTORY
The cgGLSetParameter functions were introduced in Cg 1.1.
SEE ALSO
cgGLGetParameter, cgGLSetParameterArray,
cgGLSetMatrixParameter, cgGLSetMatrixParameterArray,
cgGLSetTextureParameter, cgGLBindProgram
Cg Toolkit 2.1 Last change: 2
|