glMapBuffer

map a buffer object's data store

Signature

glMapBuffer( GLenum ( target ) , GLenum ( access ) )-> void *
glMapBuffer( target , access ) -> <class 'ctypes.c_void_p'>
glUnmapBuffer( GLenum ( target ) )-> GLboolean
glUnmapBuffer( target ) -> <class 'ctypes.c_ubyte'>

Parameters

VariablesDescription
target
Specifies the target buffer object being mapped. The symbolic constant must be GL_ARRAY_BUFFER , GL_ATOMIC_COUNTER_BUFFER , GL_COPY_READ_BUFFER , GL_COPY_WRITE_BUFFER , GL_DRAW_INDIRECT_BUFFER , GL_DISPATCH_INDIRECT_BUFFER , GL_ELEMENT_ARRAY_BUFFER , GL_PIXEL_PACK_BUFFER , GL_PIXEL_UNPACK_BUFFER , GL_QUERY_BUFFER , GL_SHADER_STORAGE_BUFFER , GL_TEXTURE_BUFFER , GL_TRANSFORM_FEEDBACK_BUFFER or GL_UNIFORM_BUFFER .
access
For glMapBuffer only, specifies the access policy, indicating whether it will be possible to read from, write to, or both read from and write to the buffer object's mapped data store. The symbolic constant must be GL_READ_ONLY , GL_WRITE_ONLY , or GL_READ_WRITE .

Sample Code References

The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.

glMapBuffer
{GPL3} OpenGL-Programmable 09-gles2.py Lines: 264
{GPL3} OpenGL-Programmable 10-gl3.2core.py Lines: 274
{GPL3} OpenGL-Programmable 08-pbo.py Lines: 242
glUnmapBuffer
{GPL3} OpenGL-Programmable 09-gles2.py Lines: 269
{GPL3} OpenGL-Programmable 10-gl3.2core.py Lines: 279
{GPL3} OpenGL-Programmable 08-pbo.py Lines: 247