cgGetParameterBufferIndex(3)

NAME
cgGetParameterBufferIndex - get buffer index by parameter

SYNOPSIS
  #include <Cg/cg.h>
  int cgGetParameterBufferIndex( CGparameter param );

PARAMETERS
The parameter for which the associated buffer index will be retrieved.

RETURN VALUES
Returns the index for the buffer to which param belongs.

Returns -1 if param does not belong to a buffer or an error occurs.

DESCRIPTION
cgGetParameterBufferIndex returns the index for the buffer to which a parameter belongs. If param does not belong to a buffer, then -1 is returned.

EXAMPLES
int index = cgGetParameterBufferIndex( myParam );

ERRORS
CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid parameter.

HISTORY
cgGetParameterBufferIndex was introduced in Cg 2.0.

SEE ALSO
cgSetProgramBuffer, cgGetParameterBufferOffset, cgGetParameterResourceSize