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 / ATI / envmap_bumpmap.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  3.3 KB  |  79 lines

  1. '''OpenGL extension ATI.envmap_bumpmap
  2.  
  3. Overview (from the spec)
  4.     
  5.     This extension adds environment mapped bump mapping (EMBM) to the GL.
  6.     The method exposed by this extension is to use a dependent texture
  7.     read on a bumpmap (du,dv) texture to offset the texture coordinates
  8.     read into a map on another texture unit.  This (du,dv) offset is also 
  9.     rotated through a user-specified rotation matrix to get the texture 
  10.     coordinates into the appropriate space.
  11.     
  12.     A new texture format is introduced in order for specifying the (du,dv)
  13.     bumpmap texture.  This map represents -1 <= du,dv <= 1 offsets to
  14.     be applied to the texture coordinates used to read into the base
  15.     map.  Additionally, the (du,dv) offsets are transformed by a rotation
  16.     matrix that this extension allows the user to specify.  Further, a 
  17.     new color operation is added to EXT_texture_env_combine to specify 
  18.     both that bumpmapping is enabled and which texture unit to apply 
  19.     the bump offset to.  
  20.  
  21. The official definition of this extension is available here:
  22.     http://oss.sgi.com/projects/ogl-sample/registry/ATI/envmap_bumpmap.txt
  23.  
  24. Automatically generated by the get_gl_extensions script, do not edit!
  25. '''
  26. from OpenGL import platform, constants, constant, arrays
  27. from OpenGL import extensions
  28. from OpenGL.GL import glget
  29. import ctypes
  30. EXTENSION_NAME = 'GL_ATI_envmap_bumpmap'
  31. GL_BUMP_ROT_MATRIX_ATI = constant.Constant( 'GL_BUMP_ROT_MATRIX_ATI', 0x8775 )
  32. GL_BUMP_ROT_MATRIX_SIZE_ATI = constant.Constant( 'GL_BUMP_ROT_MATRIX_SIZE_ATI', 0x8776 )
  33. GL_BUMP_NUM_TEX_UNITS_ATI = constant.Constant( 'GL_BUMP_NUM_TEX_UNITS_ATI', 0x8777 )
  34. GL_BUMP_TEX_UNITS_ATI = constant.Constant( 'GL_BUMP_TEX_UNITS_ATI', 0x8778 )
  35. GL_DUDV_ATI = constant.Constant( 'GL_DUDV_ATI', 0x8779 )
  36. GL_DU8DV8_ATI = constant.Constant( 'GL_DU8DV8_ATI', 0x877A )
  37. GL_BUMP_ENVMAP_ATI = constant.Constant( 'GL_BUMP_ENVMAP_ATI', 0x877B )
  38. GL_BUMP_TARGET_ATI = constant.Constant( 'GL_BUMP_TARGET_ATI', 0x877C )
  39. glTexBumpParameterivATI = platform.createExtensionFunction( 
  40.     'glTexBumpParameterivATI', dll=platform.GL,
  41.     extension=EXTENSION_NAME,
  42.     resultType=None, 
  43.     argTypes=(constants.GLenum, arrays.GLintArray,),
  44.     doc = 'glTexBumpParameterivATI( GLenum(pname), GLintArray(param) ) -> None',
  45.     argNames = ('pname', 'param',),
  46. )
  47.  
  48. glTexBumpParameterfvATI = platform.createExtensionFunction( 
  49.     'glTexBumpParameterfvATI', dll=platform.GL,
  50.     extension=EXTENSION_NAME,
  51.     resultType=None, 
  52.     argTypes=(constants.GLenum, arrays.GLfloatArray,),
  53.     doc = 'glTexBumpParameterfvATI( GLenum(pname), GLfloatArray(param) ) -> None',
  54.     argNames = ('pname', 'param',),
  55. )
  56.  
  57. glGetTexBumpParameterivATI = platform.createExtensionFunction( 
  58.     'glGetTexBumpParameterivATI', dll=platform.GL,
  59.     extension=EXTENSION_NAME,
  60.     resultType=None, 
  61.     argTypes=(constants.GLenum, arrays.GLintArray,),
  62.     doc = 'glGetTexBumpParameterivATI( GLenum(pname), GLintArray(param) ) -> None',
  63.     argNames = ('pname', 'param',),
  64. )
  65.  
  66. glGetTexBumpParameterfvATI = platform.createExtensionFunction( 
  67.     'glGetTexBumpParameterfvATI', dll=platform.GL,
  68.     extension=EXTENSION_NAME,
  69.     resultType=None, 
  70.     argTypes=(constants.GLenum, arrays.GLfloatArray,),
  71.     doc = 'glGetTexBumpParameterfvATI( GLenum(pname), GLfloatArray(param) ) -> None',
  72.     argNames = ('pname', 'param',),
  73. )
  74.  
  75.  
  76. def glInitEnvmapBumpmapATI():
  77.     '''Return boolean indicating whether this extension is available'''
  78.     return extensions.hasGLExtension( EXTENSION_NAME )
  79.