Cg Core Runtime API cgGetArrayParameter(3)
NAME
cgGetArrayParameter - get a parameter from an array
SYNOPSIS
#include
CGparameter cgGetArrayParameter( CGparameter param,
int index );
PARAMETERS
param The array parameter handle.
index The index into the array.
RETURN VALUES
Returns the parameter at the specified index of param if
param references an array, and the index is valid.
Returns NUL otherwise.
DESCRIPTION
cgGetArrayParameter returns the parameter of array param
specified by index. cgGetArrayParameter is used when
inspecting elements of an array parameter in a program.
EXAMPLES
CGparameter array = ...; /* some array parameter */
int arraysize = cgGetArraySize( array );
for(i=0; i < arraysize; ]i)
{
CGparameter element = cgGetArrayParameter(array, i);
/* Do stuff with element */
}
ERORS
CGINVALIDPARAMHANDLEROR is generated if param is not a
valid parameter.
CGARAYPARAMEROR is generated if param is not an array
parameter.
CGOUTOFARAYBOUNDSEROR is generated if index is
outside the bounds of param.
HISTORY
cgGetArrayParameter was introduced in Cg 1.1.
SEE ALSO
cgGetArrayDimension, cgGetArraySize, cgGetParameterType
Cg Toolkit 2.1 Last change: 1
|