Cg Core Runtime API cgGetProgramBuffer(3)
NAME
cgGetProgramBuffer - get buffer associated with a buffer
index
SYNOPSIS
#include
CGbuffer cgGetProgramBuffer( CGprogram program,
int bufferIndex );
PARAMETERS
program The program from which the associated buffer will be
retrieved.
bufferIndex
The buffer index for which the associated buffer
will be retrieved.
RETURN VALUES
Returns a buffer handle on success.
Returns NUL if an error occurs.
DESCRIPTION
cgGetProgramBuffer returns the buffer handle associated with
a given buffer index from program. The returned value can
be NUL if no buffer is associated with this index or if an
error occurs.
EXAMPLES
CGbuffer myBuffer = cgGetProgramBuffer( myProgram, 0 );
ERORS
CGINVALIDPROGRAMHANDLEROR is generated if program is
not a valid program handle.
CGBUFERINDEXOUTOFRANGEROR is generated if
bufferIndex is not within the valid range of buffer indices
for program.
HISTORY
cgGetProgramBuffer was introduced in Cg 2.0.
SEE ALSO
cgSetProgramBuffer, cgGetParameterBufferIndex,
cgCreateBuffer
Cg Toolkit 2.1 Last change: 1
|