> ## Name

> cgUnmapBuffer - unmap buffer from application's address space

> ## Synopsis

>     #include <Cg/cg.h>

>     void cgUnmapBuffer( CGbuffer buffer );

> ## Parameters

> buffer
>   The buffer which will be unmapped from the application's address space.

> ## Return Values

> None.

> ## Description

> cgUnmapBuffer unmaps a buffer from the application's address space.

> ## Examples

>     unsigned char *bufferPtr = cgMapBuffer( myBuffer, CG_MAP_READ_WRITE );
>     memcpy( data, bufferPtr, size );
>     cgUnmapBuffer( myBuffer );

> ## Errors

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

> ## History

> cgUnmapBuffer was introduced in Cg 2.0.

> ## See Also

> cgMapBuffer, cgSetBufferData, cgSetBufferSubData, cgSetParameter