home *** CD-ROM | disk | FTP | other *** search
/ Hackers Magazine 57 / CdHackersMagazineNr57.iso / Software / Multimedia / k3d-setup-0.7.11.0.exe / lib / site-packages / OpenGL / raw / GL / SGIX / async.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  4.4 KB  |  117 lines

  1. '''OpenGL extension SGIX.async
  2.  
  3. Overview (from the spec)
  4.     
  5.     This extension provides a framework for asynchronous OpenGL
  6.     commands.  It also provides commands allowing a program to wait
  7.     for the completion of asynchronous commands.
  8.     
  9.     Asynchronous commands have two properties:
  10.     
  11.     1) Asynchronous commands are non-blocking.  For example, an
  12.     asynchronous ReadPixels command returns control to the program
  13.     immediately rather than blocking until the command completes.
  14.     This property allows the program to issue other OpenGL commands in
  15.     parallel with the execution of commands that normally block.
  16.     
  17.     2) Asynchronous commands may complete out-of-order with respect to
  18.     other OpenGL commands.  For example, an asynchronous TexImage
  19.     command may complete after subsequent OpenGL commands issued by
  20.     the program rather than maintaining the normal serial order of the
  21.     OpenGL command stream.  This property allows the graphics
  22.     accelerator to execute asynchronous commands in parallel with the
  23.     normal command stream, for instance using a secondary path to
  24.     transfer data from or to the host, without doing any dependency
  25.     checking.
  26.     
  27.     Programs that issue asynchronous commands must also be able to
  28.     determine when the commands have completed.  The completion status
  29.     may be needed so that results can be retrieved (e.g. the image
  30.     data from a ReadPixels command) or so that dependent commands can
  31.     be issued (e.g. drawing commands that use texture data downloaded
  32.     by an earlier asynchronous command).  This extension provides
  33.     fine-grain control over asynchronous commands by introducing a
  34.     mechanism for determining the status of individual commands.
  35.     
  36.     Each invocation of an asynchronous command is associated with an
  37.     integer called a "marker."  A program specifies a marker before it
  38.     issues an asynchronous command.  The program may later issue a
  39.     command to query if any asynchronous commands have completed.  The
  40.     query commands return a marker to identify the command that
  41.     completed.  This extension provides both blocking and non-blocking
  42.     query commands.
  43.     
  44.     This extension does not define any asynchronous commands.
  45.     See SGIX_async_pixel for the asynchronous pixel commands.
  46.  
  47. The official definition of this extension is available here:
  48.     http://oss.sgi.com/projects/ogl-sample/registry/SGIX/async.txt
  49.  
  50. Automatically generated by the get_gl_extensions script, do not edit!
  51. '''
  52. from OpenGL import platform, constants, constant, arrays
  53. from OpenGL import extensions
  54. from OpenGL.GL import glget
  55. import ctypes
  56. EXTENSION_NAME = 'GL_SGIX_async'
  57. GL_ASYNC_MARKER_SGIX = constant.Constant( 'GL_ASYNC_MARKER_SGIX', 0x8329 )
  58. glget.addGLGetConstant( GL_ASYNC_MARKER_SGIX, (1,) )
  59. glAsyncMarkerSGIX = platform.createExtensionFunction( 
  60.     'glAsyncMarkerSGIX', dll=platform.GL,
  61.     extension=EXTENSION_NAME,
  62.     resultType=None, 
  63.     argTypes=(constants.GLuint,),
  64.     doc = 'glAsyncMarkerSGIX( GLuint(marker) ) -> None',
  65.     argNames = ('marker',),
  66. )
  67.  
  68. glFinishAsyncSGIX = platform.createExtensionFunction( 
  69.     'glFinishAsyncSGIX', dll=platform.GL,
  70.     extension=EXTENSION_NAME,
  71.     resultType=constants.GLint, 
  72.     argTypes=(arrays.GLuintArray,),
  73.     doc = 'glFinishAsyncSGIX( GLuintArray(markerp) ) -> constants.GLint',
  74.     argNames = ('markerp',),
  75. )
  76.  
  77. glPollAsyncSGIX = platform.createExtensionFunction( 
  78.     'glPollAsyncSGIX', dll=platform.GL,
  79.     extension=EXTENSION_NAME,
  80.     resultType=constants.GLint, 
  81.     argTypes=(arrays.GLuintArray,),
  82.     doc = 'glPollAsyncSGIX( GLuintArray(markerp) ) -> constants.GLint',
  83.     argNames = ('markerp',),
  84. )
  85.  
  86. glGenAsyncMarkersSGIX = platform.createExtensionFunction( 
  87.     'glGenAsyncMarkersSGIX', dll=platform.GL,
  88.     extension=EXTENSION_NAME,
  89.     resultType=constants.GLuint, 
  90.     argTypes=(constants.GLsizei,),
  91.     doc = 'glGenAsyncMarkersSGIX( GLsizei(range) ) -> constants.GLuint',
  92.     argNames = ('range',),
  93. )
  94.  
  95. glDeleteAsyncMarkersSGIX = platform.createExtensionFunction( 
  96.     'glDeleteAsyncMarkersSGIX', dll=platform.GL,
  97.     extension=EXTENSION_NAME,
  98.     resultType=None, 
  99.     argTypes=(constants.GLuint, constants.GLsizei,),
  100.     doc = 'glDeleteAsyncMarkersSGIX( GLuint(marker), GLsizei(range) ) -> None',
  101.     argNames = ('marker', 'range',),
  102. )
  103.  
  104. glIsAsyncMarkerSGIX = platform.createExtensionFunction( 
  105.     'glIsAsyncMarkerSGIX', dll=platform.GL,
  106.     extension=EXTENSION_NAME,
  107.     resultType=constants.GLboolean, 
  108.     argTypes=(constants.GLuint,),
  109.     doc = 'glIsAsyncMarkerSGIX( GLuint(marker) ) -> constants.GLboolean',
  110.     argNames = ('marker',),
  111. )
  112.  
  113.  
  114. def glInitAsyncSGIX():
  115.     '''Return boolean indicating whether this extension is available'''
  116.     return extensions.hasGLExtension( EXTENSION_NAME )
  117.