cgGLSetParameter

Langue: en

Version: 46886 (openSuse - 09/10/07)

Section: 3 (Bibliothèques de fonctions)

NAME

cgGLSetParameter - set the values of a scalar or vector parameter

SYNOPSIS


  #include <Cg/cgGL.h>






  /* 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.

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.

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_INVALID_PARAMETER_ERROR 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, cgGLSetTextureParameterArray, cgGLBindProgram