cgGLGetBufferObject
Keywords: cgGLGetBufferObject, NVIDIA, NVIDIA Cg Toolkit, Cg Toolkit, Shader, Shader Programming, GPU Shader Programming, GPU Program

> ## Name

> cgGLGetBufferObject - get OpenGL buffer object for a buffer

> ## Synopsis

>     #include <Cg/cgGL.h>

>     GLuint cgGLGetBufferObject( CGbuffer buffer );

> ## Parameters

> buffer
>   The buffer for which the associated OpenGL buffer object will be retrieved.

> ## Return Values

> Returns the OpenGL buffer object associated with buffer.

> Returns 0 if an error occurs.

> ## Description

> cgGLGetBufferObject returns the OpenGL buffer object associated with a buffer.

> ## Examples

> GLuint id = cgGLGetBufferObject( myBuffer );

> ## Errors

> CG_INVALID_BUFFER_HANDLE_ERROR is generated if buffer is not a valid buffer.

> ## History

> cgGLGetBufferObject was introduced in Cg 2.0.

> ## See Also

> cgCreateBuffer, cgGLCreateBuffer