'''OpenGL extension ARB.map_buffer_range

The official definition of this extension is available here:
	http://oss.sgi.com/projects/ogl-sample/registry/ARB/map_buffer_range.txt

Automatically generated by the get_gl_extensions script, do not edit!
'''
from OpenGL import platform, constants, constant, arrays
from OpenGL import extensions
from OpenGL.GL import glget
import ctypes
EXTENSION_NAME = 'GL_ARB_map_buffer_range'
GL_MAP_READ_BIT = constant.Constant( 'GL_MAP_READ_BIT', 0x1 )
GL_MAP_WRITE_BIT = constant.Constant( 'GL_MAP_WRITE_BIT', 0x2 )
GL_MAP_INVALIDATE_RANGE_BIT = constant.Constant( 'GL_MAP_INVALIDATE_RANGE_BIT', 0x4 )
GL_MAP_INVALIDATE_BUFFER_BIT = constant.Constant( 'GL_MAP_INVALIDATE_BUFFER_BIT', 0x8 )
GL_MAP_FLUSH_EXPLICIT_BIT = constant.Constant( 'GL_MAP_FLUSH_EXPLICIT_BIT', 0x10 )
GL_MAP_UNSYNCHRONIZED_BIT = constant.Constant( 'GL_MAP_UNSYNCHRONIZED_BIT', 0x20 )
glMapBufferRange = platform.createExtensionFunction( 
	'glMapBufferRange', dll=platform.GL,
	extension=EXTENSION_NAME,
	resultType=None, 
	argTypes=(constants.GLenum, constants.GLintptr, constants.GLsizeiptr, constants.GLbitfield,),
	doc = 'glMapBufferRange( GLenum(target), GLintptr(offset), GLsizeiptr(length), GLbitfield(access) ) -> None',
	argNames = ('target', 'offset', 'length', 'access',),
)

glFlushMappedBufferRange = platform.createExtensionFunction( 
	'glFlushMappedBufferRange', dll=platform.GL,
	extension=EXTENSION_NAME,
	resultType=None, 
	argTypes=(constants.GLenum, constants.GLintptr, constants.GLsizeiptr,),
	doc = 'glFlushMappedBufferRange( GLenum(target), GLintptr(offset), GLsizeiptr(length) ) -> None',
	argNames = ('target', 'offset', 'length',),
)


def glInitMapBufferRangeARB():
	'''Return boolean indicating whether this extension is available'''
	return extensions.hasGLExtension( EXTENSION_NAME )
