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 / ARB / matrix_palette.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  4.0 KB  |  94 lines

  1. '''OpenGL extension ARB.matrix_palette
  2.  
  3. Overview (from the spec)
  4.     
  5.     This extension extends the abilities of ARB_vertex_blend to include 
  6.     a palette of modelview matrices.  The n vertex units use a palette
  7.     of m modelview matrices.  (Where n and m are constrained to
  8.     implementation defined maxima.)  Each vertex has a set of n
  9.     indices into the palette, and a corresponding set of n weights.
  10.     Matrix indices can be changed for each vertex (between Begin and
  11.     End).  
  12.     
  13.     When this extension is utilized, the enabled units transform each
  14.     vertex by the modelview matrices specified by the vertices'
  15.     respective indices.  These results are subsequently scaled by the
  16.     weights of the respective units and then summed to create the
  17.     eyespace vertex.   
  18.     
  19.     A similar procedure is followed for normals.  Normals, however,
  20.     are transformed by the inverse transpose of the modelview matrix.
  21.  
  22. The official definition of this extension is available here:
  23.     http://oss.sgi.com/projects/ogl-sample/registry/ARB/matrix_palette.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_ARB_matrix_palette'
  32. GL_MATRIX_PALETTE_ARB = constant.Constant( 'GL_MATRIX_PALETTE_ARB', 0x8840 )
  33. GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB = constant.Constant( 'GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB', 0x8841 )
  34. GL_MAX_PALETTE_MATRICES_ARB = constant.Constant( 'GL_MAX_PALETTE_MATRICES_ARB', 0x8842 )
  35. GL_CURRENT_PALETTE_MATRIX_ARB = constant.Constant( 'GL_CURRENT_PALETTE_MATRIX_ARB', 0x8843 )
  36. GL_MATRIX_INDEX_ARRAY_ARB = constant.Constant( 'GL_MATRIX_INDEX_ARRAY_ARB', 0x8844 )
  37. GL_CURRENT_MATRIX_INDEX_ARB = constant.Constant( 'GL_CURRENT_MATRIX_INDEX_ARB', 0x8845 )
  38. GL_MATRIX_INDEX_ARRAY_SIZE_ARB = constant.Constant( 'GL_MATRIX_INDEX_ARRAY_SIZE_ARB', 0x8846 )
  39. glget.addGLGetConstant( GL_MATRIX_INDEX_ARRAY_SIZE_ARB, (1,) )
  40. GL_MATRIX_INDEX_ARRAY_TYPE_ARB = constant.Constant( 'GL_MATRIX_INDEX_ARRAY_TYPE_ARB', 0x8847 )
  41. glget.addGLGetConstant( GL_MATRIX_INDEX_ARRAY_TYPE_ARB, (1,) )
  42. GL_MATRIX_INDEX_ARRAY_STRIDE_ARB = constant.Constant( 'GL_MATRIX_INDEX_ARRAY_STRIDE_ARB', 0x8848 )
  43. glget.addGLGetConstant( GL_MATRIX_INDEX_ARRAY_STRIDE_ARB, (1,) )
  44. GL_MATRIX_INDEX_ARRAY_POINTER_ARB = constant.Constant( 'GL_MATRIX_INDEX_ARRAY_POINTER_ARB', 0x8849 )
  45. glCurrentPaletteMatrixARB = platform.createExtensionFunction( 
  46.     'glCurrentPaletteMatrixARB', dll=platform.GL,
  47.     extension=EXTENSION_NAME,
  48.     resultType=None, 
  49.     argTypes=(constants.GLint,),
  50.     doc = 'glCurrentPaletteMatrixARB( GLint(index) ) -> None',
  51.     argNames = ('index',),
  52. )
  53.  
  54. glMatrixIndexubvARB = platform.createExtensionFunction( 
  55.     'glMatrixIndexubvARB', dll=platform.GL,
  56.     extension=EXTENSION_NAME,
  57.     resultType=None, 
  58.     argTypes=(constants.GLint, arrays.GLubyteArray,),
  59.     doc = 'glMatrixIndexubvARB( GLint(size), GLubyteArray(indices) ) -> None',
  60.     argNames = ('size', 'indices',),
  61. )
  62.  
  63. glMatrixIndexusvARB = platform.createExtensionFunction( 
  64.     'glMatrixIndexusvARB', dll=platform.GL,
  65.     extension=EXTENSION_NAME,
  66.     resultType=None, 
  67.     argTypes=(constants.GLint, arrays.GLushortArray,),
  68.     doc = 'glMatrixIndexusvARB( GLint(size), GLushortArray(indices) ) -> None',
  69.     argNames = ('size', 'indices',),
  70. )
  71.  
  72. glMatrixIndexuivARB = platform.createExtensionFunction( 
  73.     'glMatrixIndexuivARB', dll=platform.GL,
  74.     extension=EXTENSION_NAME,
  75.     resultType=None, 
  76.     argTypes=(constants.GLint, arrays.GLuintArray,),
  77.     doc = 'glMatrixIndexuivARB( GLint(size), GLuintArray(indices) ) -> None',
  78.     argNames = ('size', 'indices',),
  79. )
  80.  
  81. glMatrixIndexPointerARB = platform.createExtensionFunction( 
  82.     'glMatrixIndexPointerARB', dll=platform.GL,
  83.     extension=EXTENSION_NAME,
  84.     resultType=None, 
  85.     argTypes=(constants.GLint, constants.GLenum, constants.GLsizei, ctypes.c_void_p,),
  86.     doc = 'glMatrixIndexPointerARB( GLint(size), GLenum(type), GLsizei(stride), c_void_p(pointer) ) -> None',
  87.     argNames = ('size', 'type', 'stride', 'pointer',),
  88. )
  89.  
  90.  
  91. def glInitMatrixPaletteARB():
  92.     '''Return boolean indicating whether this extension is available'''
  93.     return extensions.hasGLExtension( EXTENSION_NAME )
  94.