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 / APPLE / element_array.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  3.8 KB  |  85 lines

  1. '''OpenGL extension APPLE.element_array
  2.  
  3. Overview (from the spec)
  4.     
  5.     This extension provides facilities to improve DrawElements style vertex
  6.     indices submission performance by allowing index arrays.  Using this
  7.     extension these arrays can be contained inside a vertex array range and
  8.     thus pulled directly by the graphics processor, avoiding the CPU overhead
  9.     of touching the index data.
  10.     
  11.     This extension is most useful when used in conjunction with the
  12.     APPLE_vertex_array_range extension. APPLE_vertex_array_range provides an
  13.     interface for storing vertex array data. In cases where large amounts of
  14.     vertex data are in use, the index data used to construct primitives
  15.     (typically as passed to the GL through DrawElements) can impose a
  16.     significant bandwidth burden. APPLE_element_array allows the application to
  17.     specify independent arrays of elements, which can then be cached using
  18.     APPLE_vertex_array_range.  In effect this creates a more orthogonal
  19.     interface for both vertex indices and data.
  20.     
  21.  
  22. The official definition of this extension is available here:
  23.     http://oss.sgi.com/projects/ogl-sample/registry/APPLE/element_array.txt
  24.  
  25. Automatically generated by the get_gl_extensions script, do not edit!
  26. '''
  27. from OpenGL import platform, constants, constant, arrays
  28. from OpenGL import extensions
  29. from OpenGL.GL import glget
  30. import ctypes
  31. EXTENSION_NAME = 'GL_APPLE_element_array'
  32. GL_ELEMENT_ARRAY_APPLE = constant.Constant( 'GL_ELEMENT_ARRAY_APPLE', 0x8768 )
  33. GL_ELEMENT_ARRAY_TYPE_APPLE = constant.Constant( 'GL_ELEMENT_ARRAY_TYPE_APPLE', 0x8769 )
  34. glget.addGLGetConstant( GL_ELEMENT_ARRAY_TYPE_APPLE, (1,) )
  35. GL_ELEMENT_ARRAY_POINTER_APPLE = constant.Constant( 'GL_ELEMENT_ARRAY_POINTER_APPLE', 0x876A )
  36. glElementPointerAPPLE = platform.createExtensionFunction( 
  37.     'glElementPointerAPPLE', dll=platform.GL,
  38.     extension=EXTENSION_NAME,
  39.     resultType=None, 
  40.     argTypes=(constants.GLenum, ctypes.c_void_p,),
  41.     doc = 'glElementPointerAPPLE( GLenum(type), c_void_p(pointer) ) -> None',
  42.     argNames = ('type', 'pointer',),
  43. )
  44.  
  45. glDrawElementArrayAPPLE = platform.createExtensionFunction( 
  46.     'glDrawElementArrayAPPLE', dll=platform.GL,
  47.     extension=EXTENSION_NAME,
  48.     resultType=None, 
  49.     argTypes=(constants.GLenum, constants.GLint, constants.GLsizei,),
  50.     doc = 'glDrawElementArrayAPPLE( GLenum(mode), GLint(first), GLsizei(count) ) -> None',
  51.     argNames = ('mode', 'first', 'count',),
  52. )
  53.  
  54. glDrawRangeElementArrayAPPLE = platform.createExtensionFunction( 
  55.     'glDrawRangeElementArrayAPPLE', dll=platform.GL,
  56.     extension=EXTENSION_NAME,
  57.     resultType=None, 
  58.     argTypes=(constants.GLenum, constants.GLuint, constants.GLuint, constants.GLint, constants.GLsizei,),
  59.     doc = 'glDrawRangeElementArrayAPPLE( GLenum(mode), GLuint(start), GLuint(end), GLint(first), GLsizei(count) ) -> None',
  60.     argNames = ('mode', 'start', 'end', 'first', 'count',),
  61. )
  62.  
  63. glMultiDrawElementArrayAPPLE = platform.createExtensionFunction( 
  64.     'glMultiDrawElementArrayAPPLE', dll=platform.GL,
  65.     extension=EXTENSION_NAME,
  66.     resultType=None, 
  67.     argTypes=(constants.GLenum, arrays.GLintArray, arrays.GLsizeiArray, constants.GLsizei,),
  68.     doc = 'glMultiDrawElementArrayAPPLE( GLenum(mode), GLintArray(first), GLsizeiArray(count), GLsizei(primcount) ) -> None',
  69.     argNames = ('mode', 'first', 'count', 'primcount',),
  70. )
  71.  
  72. glMultiDrawRangeElementArrayAPPLE = platform.createExtensionFunction( 
  73.     'glMultiDrawRangeElementArrayAPPLE', dll=platform.GL,
  74.     extension=EXTENSION_NAME,
  75.     resultType=None, 
  76.     argTypes=(constants.GLenum, constants.GLuint, constants.GLuint, arrays.GLintArray, arrays.GLsizeiArray, constants.GLsizei,),
  77.     doc = 'glMultiDrawRangeElementArrayAPPLE( GLenum(mode), GLuint(start), GLuint(end), GLintArray(first), GLsizeiArray(count), GLsizei(primcount) ) -> None',
  78.     argNames = ('mode', 'start', 'end', 'first', 'count', 'primcount',),
  79. )
  80.  
  81.  
  82. def glInitElementArrayAPPLE():
  83.     '''Return boolean indicating whether this extension is available'''
  84.     return extensions.hasGLExtension( EXTENSION_NAME )
  85.