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

> ## Name

> cgDestroyBuffer - delete a buffer

> ## Synopsis

>     #include <Cg/cg.h>

>     void cgDestroyBuffer( CGbuffer buffer );

> ## Parameters

> buffer
>   The buffer to delete.

> ## Return Values

> None.

> ## Description

> cgDestroyBuffer deletes a buffer. The buffer object is not actually destroyed until no more programs are bound to the buffer object and any pending use of the buffer has completed. However, the handle buffer no longer refers to the buffer object (although it may be subsequently allocated to a different created resource).

> ## Examples

> cgDestroyBuffer( myBuffer );

> ## Errors

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

> ## History

> cgDestroyBuffer was introduced in Cg 2.0.

> ## See Also

> cgCreateBuffer, cgGLCreateBuffer