NAME
cgGetArrayParameter - get a parameter from an array
SYNOPSIS
#include <Cg/cg.h> CGparameter cgGetArrayParameter( CGparameter param, int index );PARAMETERS
- param
Specifies the array parameter handle.
- index
Specifies the index into the array.
DESCRIPTION
cgGetArrayParameter returns the parameter of array param specified by the index. This function is used when inspecting elements of an array parameter in a program.
EXAMPLE
CGparameter array = ...; /* some array parameter */ int array_size = cgGetArraySize( array ); for(i=0; i < array_size; ++i) { CGparameter element = cgGetArrayParameter(array, i); /* Do stuff to element */ }RETURN VALUES
Returns the parameter at the specified index of param if param references an array, and the index is valid.
Returns NULL otherwise.
ERRORS
CG_INVALID_PARAM_HANDLE_ERROR is generated if param is invalid.
CG_ARRAY_PARAM_ERROR is generated if param is not an array.
CG_OUT_OF_ARRAY_BOUNDS_ERROR is generated if index are outside the bounds of the array.
SEE ALSO
cgGetArrayDimension, cgGetArraySize, cgGetArrayParameter, cgGetParameterType