'''OpenGL extension EXT.disjoint_timer_query

This module customises the behaviour of the 
OpenGL.raw.GLES2.EXT.disjoint_timer_query to provide a more 
Python-friendly API

Overview (from the spec)
	
	Applications can benefit from accurate timing information in a number of
	different ways.  During application development, timing information can
	help identify application or driver bottlenecks.  At run time,
	applications can use timing information to dynamically adjust the amount
	of detail in a scene to achieve constant frame rates.  OpenGL
	implementations have historically provided little to no useful timing
	information.  Applications can get some idea of timing by reading timers
	on the CPU, but these timers are not synchronized with the graphics
	rendering pipeline.  Reading a CPU timer does not guarantee the completion
	of a potentially large amount of graphics work accumulated before the
	timer is read, and will thus produce wildly inaccurate results.
	glFinish() can be used to determine when previous rendering commands have
	been completed, but will idle the graphics pipeline and adversely affect
	application performance.
	
	This extension provides a query mechanism that can be used to determine
	the amount of time it takes to fully complete a set of GL commands, and
	without stalling the rendering pipeline.  It uses the query object
	mechanisms first introduced in the occlusion query extension, which allow
	time intervals to be polled asynchronously by the application.

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/EXT/disjoint_timer_query.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GLES2 import _types, _glgets
from OpenGL.raw.GLES2.EXT.disjoint_timer_query import *
from OpenGL.raw.GLES2.EXT.disjoint_timer_query import _EXTENSION_NAME

def glInitDisjointTimerQueryEXT():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

# INPUT glGenQueriesEXT.ids size not checked against n
glGenQueriesEXT=wrapper.wrapper(glGenQueriesEXT).setInputArraySize(
    'ids', None
)
# INPUT glDeleteQueriesEXT.ids size not checked against n
glDeleteQueriesEXT=wrapper.wrapper(glDeleteQueriesEXT).setInputArraySize(
    'ids', None
)
# INPUT glGetQueryivEXT.params size not checked against 'pname'
glGetQueryivEXT=wrapper.wrapper(glGetQueryivEXT).setInputArraySize(
    'params', None
)
# INPUT glGetQueryObjectivEXT.params size not checked against 'pname'
glGetQueryObjectivEXT=wrapper.wrapper(glGetQueryObjectivEXT).setInputArraySize(
    'params', None
)
# INPUT glGetQueryObjectuivEXT.params size not checked against 'pname'
glGetQueryObjectuivEXT=wrapper.wrapper(glGetQueryObjectuivEXT).setInputArraySize(
    'params', None
)
glGetQueryObjecti64vEXT=wrapper.wrapper(glGetQueryObjecti64vEXT).setOutput(
    'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
)
glGetQueryObjectui64vEXT=wrapper.wrapper(glGetQueryObjectui64vEXT).setOutput(
    'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
)
# INPUT glGetInteger64vEXT.data size not checked against 'pname'
glGetInteger64vEXT=wrapper.wrapper(glGetInteger64vEXT).setInputArraySize(
    'data', None
)
### END AUTOGENERATED SECTION