Name
cgSetUniformBufferParameter - associate a buffer with a uniform buffer parameter
Synopsis
#include <Cg/cg.h>
void cgSetUniformBufferParameter( CGparameter param,
CGbuffer buffer );
Parameters
- param
-
The parameter with which buffer will be associated.
- buffer
-
The buffer to be associated with param.
Return Values
None.
Description
cgSetUniformBufferParameter sets the buffer for a given uniform buffer parameter.
A NULL buffer handle means the given uniform buffer parameter should not be bound
to a buffer.
When the next program bind operation occurs, each uniform buffer 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 uniform buffer parameters bound to a NULL buffer
handle.
Examples
cgSetUniformBufferParameter( myParam, myBuffer );
Errors
CG_INVALID_PARAM_HANDLE_ERROR is generated if param
is not a valid parameter handle.
CG_INVALID_PARAMETER_TYPE_ERROR is generated if param
is not a uniform buffer parameter.
CG_INVALID_BUFFER_HANDLE_ERROR is generated if buffer is not a valid buffer.
History
cgSetUniformBufferParameter was introduced in Cg 3.1.
See Also
cgGetUniformBufferParameter,
cgCreateBuffer,
cgGLBindProgram,
cgD3D9BindProgram
|