Cg OpenGL Runtime API cgGLCreateBuffer(3)
NAME
cgGLCreateBuffer - create an OpenGL buffer object
SYNOPSIS
#include
CGbuffer cgGLCreateBuffer( CGcontext context,
int size,
const void *data,
GLenum bufferUsage );
PARAMETERS
context The context to which the new buffer will be added.
size The length in bytes of the buffer to create.
data The inital data to be copied into the buffer. NUL
will fill the buffer with zero.
bufferUsage
One of the usage flags specified as valid for
glBufferData.
RETURN VALUES
Returns a CGbuffer handle on success.
Returns NUL if any error occurs.
DESCRIPTION
cgGLCreateBuffer creates an OpenGL buffer object.
EXAMPLES
CGbuffer myBuffer = cgGLCreateBuffer( myCgContext, sizeof( float ) * 16,
myData, GLSTATICDRAW );
ERORS
CGINVALIDCONTEXTHANDLEROR is generated if context is
not a valid context.
HISTORY
cgGLCreateBuffer was introduced in Cg 2.0.
SEE ALSO
cgCreateBuffer, cgGLGetBufferObject
Cg Toolkit 2.1 Last change: 1
|