> # NAME

> cgGLCreateBuffer - create an OpenGL buffer object

> # SYNOPSIS

>       #include <Cg/cgGL.h>

>       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. NULL 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 NULL if any error occurs.

> # DESCRIPTION

> cgGLCreateBuffer creates an OpenGL buffer object.

> # EXAMPLES

>       CGbuffer myBuffer = cgGLCreateBuffer( myCgContext, sizeof( float ) * 16,
>                                             myData, GL_STATIC_DRAW );

> # ERRORS

> CG_INVALID_CONTEXT_HANDLE_ERROR is generated if context is not a valid context.

> # HISTORY

> cgGLCreateBuffer was introduced in Cg 2.0.

> # SEE ALSO

> cgCreateBuffer, cgGLGetBufferObject