NAME

cgGetParameterVariability - get a parameter's variability

SYNOPSIS

  #include <Cg/cg.h>

  CGenum cgGetParameterVariability( CGparameter param );

PARAMETERS

param

Specifies the program parameter.

DESCRIPTION

cgGetParameterVariability allows the application to retrieve the variablilty of a parameter in a Cg program. This variability is necessary for the application to be able to supply the program's inputs and use the program's outputs.

cgGetParameterVariability will return one of the following variabilities:

CG_VARYING

A varying parameter is one whose value changes with each invocation of the program.

CG_UNIFORM

A uniform parameter is one whose value does not change with each invocation of a program, but whose value can change between groups of program invocations.

CG_LITERAL

A literal parameter is folded out at compile time. Making a uniform parameter literal with cgSetParameterVariability will often make a program more efficient at the expense of requiring a compile every time the value is set.

CG_CONSTANT

A constant parameter is never changed by the user. It's generated by the compiler by certain profiles that require immediate values to be placed in certain resource locations.

CG_MIXED

A structure parameter that contains parameters that differ in variability.

RETURN VALUES

Returns the variability of param. Returns CG_ERROR if an error occurs.

ERRORS

CG_INVALID_PARAM_HANDLE_ERROR is generated if the handle param is invalid.

SEE ALSO

the "cgGetNamedParameter" document, the "cgGetNextParameter" document, the "cgGetParameterName" document, the "cgGetParameterType" document, the "cgGetParameterDirection" document, the "cgGetParameterBinding" document, the "cgGetParameterDirectionalBinding" document, the "cgIsArray" document, the "cgSetParameterVariablity" document, the "cgSetParameterDirection" document, the "cgSetParameterBinding" document, the "cgSetParameterDirectionalBinding" document