OpenGL.GL.ARB.sync

OpenGL extension ARB.sync
This module customises the behaviour of the OpenGL.raw.GL.ARB.sync to provide a more Python-friendly API
Overview (from the spec)
This extension introduces the concept of "sync objects". Sync objects are a synchronization primitive - a representation of events whose completion status can be tested or waited upon. One specific type of sync object, the "fence sync object", is supported in this extension, and additional types can easily be added in the future.
Fence sync objects have corresponding fences, which are inserted into the OpenGL command stream at the time the sync object is created. A sync object can be queried for a given condition. The only condition supported for fence sync objects is completion of the corresponding fence command. Fence completion allows applications to request a partial Finish, wherein all commands prior to the fence will be forced to complete before control is returned to the calling process.
These new mechanisms allow for synchronization between the host CPU and the GPU, which may be accessing the same resources (typically memory), as well as between multiple GL contexts bound to multiple threads in the host CPU.
The official definition of this extension is available here: http://www.opengl.org/registry/specs/ARB/sync.txt

Functions

glClientWaitSync( sync , flags , timeout ) -> <class 'ctypes.c_uint'>
glDeleteSync( sync )
glFenceSync( condition , flags ) -> <class 'OpenGL._opaque.GLsync_pointer'>
glGetInteger64v( pname , data )
glGetSync( sync , pname , bufSize = 1 , length = None , values = None )
Wrapper around glGetSynciv that auto-allocates buffers
sync
the GLsync struct pointer (see glGetSynciv)
pname
constant to retrieve (see glGetSynciv)
bufSize
defaults to 1, maximum number of items to retrieve, currently all constants are defined to return a single value
length
None or a GLint() instance (ONLY!), must be a byref() capable object with a .value attribute which retrieves the set value
values
None or an array object, if None, will be a default return-array-type of length bufSize
returns values[:length.value], i.e. an array with the values set by the call, currently always a single-value array.
glGetSynciv( sync , pname , bufSize , length , values )
glIsSync( sync ) -> <class 'ctypes.c_ubyte'>
glWaitSync( sync , flags , timeout )

Constants

GL_ALREADY_SIGNALED (37146)
GL_CONDITION_SATISFIED (37148)
GL_MAX_SERVER_WAIT_TIMEOUT (37137)
GL_OBJECT_TYPE (37138)
GL_SIGNALED (37145)
GL_SYNC_CONDITION (37139)
GL_SYNC_FENCE (37142)
GL_SYNC_FLAGS (37141)
GL_SYNC_FLUSH_COMMANDS_BIT (1)
GL_SYNC_GPU_COMMANDS_COMPLETE (37143)
GL_SYNC_STATUS (37140)
GL_TIMEOUT_EXPIRED (37147)
GL_TIMEOUT_IGNORED (-9223372036854775807)
GL_UNSIGNALED (37144)
GL_WAIT_FAILED (37149)