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 / transpose_matrix.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  2.9 KB  |  75 lines

  1. '''OpenGL extension ARB.transpose_matrix
  2.  
  3. Overview (from the spec)
  4.     
  5.     New functions and tokens are added allowing application matrices
  6.     stored in row major order rather than column major order to be
  7.     transferred to the OpenGL implementation.  This allows an application
  8.     to use standard C-language 2-dimensional arrays (m[row][col]) and
  9.     have the array indices match the expected matrix row and column indexes.
  10.     These arrays are referred to as transpose matrices since they are
  11.     the transpose of the standard matrices passed to OpenGL.
  12.     
  13.     This extension adds an interface for transfering data to and from the
  14.     OpenGL pipeline, it does not change any OpenGL processing or imply any
  15.     changes in state representation.
  16.  
  17. The official definition of this extension is available here:
  18.     http://oss.sgi.com/projects/ogl-sample/registry/ARB/transpose_matrix.txt
  19.  
  20. Automatically generated by the get_gl_extensions script, do not edit!
  21. '''
  22. from OpenGL import platform, constants, constant, arrays
  23. from OpenGL import extensions
  24. from OpenGL.GL import glget
  25. import ctypes
  26. EXTENSION_NAME = 'GL_ARB_transpose_matrix'
  27. GL_TRANSPOSE_MODELVIEW_MATRIX_ARB = constant.Constant( 'GL_TRANSPOSE_MODELVIEW_MATRIX_ARB', 0x84E3 )
  28. glget.addGLGetConstant( GL_TRANSPOSE_MODELVIEW_MATRIX_ARB, (4,4) )
  29. GL_TRANSPOSE_PROJECTION_MATRIX_ARB = constant.Constant( 'GL_TRANSPOSE_PROJECTION_MATRIX_ARB', 0x84E4 )
  30. glget.addGLGetConstant( GL_TRANSPOSE_PROJECTION_MATRIX_ARB, (4,4) )
  31. GL_TRANSPOSE_TEXTURE_MATRIX_ARB = constant.Constant( 'GL_TRANSPOSE_TEXTURE_MATRIX_ARB', 0x84E5 )
  32. glget.addGLGetConstant( GL_TRANSPOSE_TEXTURE_MATRIX_ARB, (4,4) )
  33. GL_TRANSPOSE_COLOR_MATRIX_ARB = constant.Constant( 'GL_TRANSPOSE_COLOR_MATRIX_ARB', 0x84E6 )
  34. glget.addGLGetConstant( GL_TRANSPOSE_COLOR_MATRIX_ARB, (4,4) )
  35. glLoadTransposeMatrixfARB = platform.createExtensionFunction( 
  36.     'glLoadTransposeMatrixfARB', dll=platform.GL,
  37.     extension=EXTENSION_NAME,
  38.     resultType=None, 
  39.     argTypes=(arrays.GLfloatArray,),
  40.     doc = 'glLoadTransposeMatrixfARB( GLfloatArray(m) ) -> None',
  41.     argNames = ('m',),
  42. )
  43.  
  44. glLoadTransposeMatrixdARB = platform.createExtensionFunction( 
  45.     'glLoadTransposeMatrixdARB', dll=platform.GL,
  46.     extension=EXTENSION_NAME,
  47.     resultType=None, 
  48.     argTypes=(arrays.GLdoubleArray,),
  49.     doc = 'glLoadTransposeMatrixdARB( GLdoubleArray(m) ) -> None',
  50.     argNames = ('m',),
  51. )
  52.  
  53. glMultTransposeMatrixfARB = platform.createExtensionFunction( 
  54.     'glMultTransposeMatrixfARB', dll=platform.GL,
  55.     extension=EXTENSION_NAME,
  56.     resultType=None, 
  57.     argTypes=(arrays.GLfloatArray,),
  58.     doc = 'glMultTransposeMatrixfARB( GLfloatArray(m) ) -> None',
  59.     argNames = ('m',),
  60. )
  61.  
  62. glMultTransposeMatrixdARB = platform.createExtensionFunction( 
  63.     'glMultTransposeMatrixdARB', dll=platform.GL,
  64.     extension=EXTENSION_NAME,
  65.     resultType=None, 
  66.     argTypes=(arrays.GLdoubleArray,),
  67.     doc = 'glMultTransposeMatrixdARB( GLdoubleArray(m) ) -> None',
  68.     argNames = ('m',),
  69. )
  70.  
  71.  
  72. def glInitTransposeMatrixARB():
  73.     '''Return boolean indicating whether this extension is available'''
  74.     return extensions.hasGLExtension( EXTENSION_NAME )
  75.