cgGetParameterBufferOffset(3)

NAME
cgGetParameterBufferOffset - get a parameter's buffer offset

SYNOPSIS
  #include <Cg/cg.h>

  int cgGetParameterBufferOffset( CGparameter param );

PARAMETERS

param
    The parameter for which the buffer offset will be retrieved.

RETURN VALUES
Returns the buffer offset for param.

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

DESCRIPTION
cgGetParameterBufferOffset returns the buffer offset associated with a parameter. If param does not belong to a buffer, then -1 is returned.

If the program to which param belongs is in an uncompiled state, it will be compiled by cgGetParameterBufferOffset. See cgSetAutoCompile for more information about program compile states.

EXAMPLES
  int offset = cgGetParameterBufferOffset( myParam );

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

HISTORY
cgGetParameterBufferOffset was introduced in Cg 2.0.

SEE ALSO
cgSetProgramBuffer, cgGetParameterBufferIndex, cgGetParameterResourceSize, cgSetAutoCompile