Cg Core Runtime API cgSetProgramBuffer(3)
NAME
cgSetProgramBuffer - set a buffer for a program
SYNOPSIS
#include
void cgSetProgramBuffer( CGprogram program,
int bufferIndex,
CGbuffer buffer );
PARAMETERS
program The program for which the buffer will be set.
bufferIndex
The buffer index of program to which buffer will be
bound.
buffer The buffer to be bound.
RETURN VALUES
None.
DESCRIPTION
cgSetProgramBuffer sets the buffer for a given buffer index
of a program. A NUL buffer handle means the given buffer
index should not be bound to a buffer.
bufferIndex must be non-negative and within the program's
range of buffer indices. For OpenGL programs, bufferIndex
can be 0 to 11. For Direct3D10 programs, bufferIndex can be
0 to 15.
When the next program bind operation occurs, each buffer
index which is set to a valid buffer handle is bound (along
with the program) for use by the 3D API. No buffer bind
operation occurs for buffer indices bound to a NUL buffer
handle.
EXAMPLES
cgSetProgramBuffer( myProgram, 2, myBuffer );
ERORS
CGINVALIDPROGRAMHANDLEROR is generated if program is
not a valid program handle.
CGINVALIDBUFERHANDLEROR is generated if buffer is not
a valid buffer.
CGBUFERINDEXOUTOFRANGEROR is generated if
bufferIndex is not within the valid range of buffer indices
for program.
Cg Toolkit 2.1 Last change: 1
Cg Core Runtime API cgSetProgramBuffer(3)
HISTORY
cgSetProgramBuffer was introduced in Cg 2.0.
SEE ALSO
cgCreateBuffer, cgGetProgramBuffer, cgGLBindProgram,
cgD3D9BindProgram, cgD3D8BindProgram
Cg Toolkit 2.1 Last change: 2
|