NAME
cgGetParameterOrdinalNumber - get a program parameter's ordinal number
SYNOPSIS
#include <Cg/cg.h> int cgGetParameterOrdinalNumber(CGparameter param);PARAMETERS
- param
Specifies the program parameter.
DESCRIPTION
cgGetParameterOrdinalNumber returns an integer that represents the position of a parameter when it was declared within the Cg program. For example the following Cg program :
MYOUT main(float2 position : POSITION, float4 color : COLOR, uniform float4x4 matrix, float2 texCoord : TEXCOORD0) { // etc ... }Would generate the following parameters and associated ordinal numbers :
position -> 0 color -> 1 matrix -> 2 texCoord -> 3RETURN VALUES
Returns the ordinal number associated with a parameter. The parameter must not be a constant. If it is a constant (cgGetParameterVariability returns CG_CONSTANT) then 0 is returned and no error is generated.
ERRORS
CG_INVALID_PARAM_HANDLE_ERROR is generated if the handle param is invalid.
CG_INVALID_PARAMETER_ERROR is generated if the parameter is not a leaf node.
SEE ALSO