BuffersGL 1.5
glUnmapBuffer
Ends a mapping and gives the buffer back to OpenGL.
Signature
GLboolean glUnmapBuffer(GLenum target);
How it works
After this call the pointer from glMapBuffer or glMapBufferRange is invalid, and the buffer can be used for drawing again.
Parameters
targetGLenum
Slot whose bound buffer is unmapped.
Return value
GL_TRUE normally. GL_FALSE if the contents became corrupt while mapped (rare, e.g. after a display mode change) — upload the data again.
Errors
When the call is invalid it does nothing and sets an error, which glGetError returns:
- GL_INVALID_OPERATION
- The buffer is not mapped.