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 / EXT / light_texture.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  3.0 KB  |  74 lines

  1. '''OpenGL extension EXT.light_texture
  2.  
  3. Overview (from the spec)
  4.     
  5.         This extension defines a general mechanism for substituting the
  6.         fragment color computed during texture environment processing in
  7.         place of other fragment attributes such as the fragment normal, or
  8.         as sources for some of the computations in the fragment processing
  9.         pipeline, for example as material or light parameters in the
  10.         fragment lighting computations.
  11.     
  12.     
  13.         Cf ----------------------+
  14.                      |                 +-> to lighting parameters
  15.                                  v                 |
  16.         +------------+        +--------+     +-------------+
  17.         |            |        |        |     |             |
  18.         | texel      |------->| texenv |-----| texture     |---> Cf' (to Light Environment
  19.         | generation |        |        |     | application |          or Fog)
  20.         |            |        |        |     |             |
  21.         +------------+        +--------+     +-------------+
  22.     
  23.  
  24. The official definition of this extension is available here:
  25.     http://oss.sgi.com/projects/ogl-sample/registry/EXT/light_texture.txt
  26.  
  27. Automatically generated by the get_gl_extensions script, do not edit!
  28. '''
  29. from OpenGL import platform, constants, constant, arrays
  30. from OpenGL import extensions
  31. from OpenGL.GL import glget
  32. import ctypes
  33. EXTENSION_NAME = 'GL_EXT_light_texture'
  34. GL_FRAGMENT_MATERIAL_EXT = constant.Constant( 'GL_FRAGMENT_MATERIAL_EXT', 0x8349 )
  35. GL_FRAGMENT_NORMAL_EXT = constant.Constant( 'GL_FRAGMENT_NORMAL_EXT', 0x834A )
  36. GL_FRAGMENT_COLOR_EXT = constant.Constant( 'GL_FRAGMENT_COLOR_EXT', 0x834C )
  37. GL_ATTENUATION_EXT = constant.Constant( 'GL_ATTENUATION_EXT', 0x834D )
  38. GL_SHADOW_ATTENUATION_EXT = constant.Constant( 'GL_SHADOW_ATTENUATION_EXT', 0x834E )
  39. GL_TEXTURE_APPLICATION_MODE_EXT = constant.Constant( 'GL_TEXTURE_APPLICATION_MODE_EXT', 0x834F )
  40. GL_TEXTURE_LIGHT_EXT = constant.Constant( 'GL_TEXTURE_LIGHT_EXT', 0x8350 )
  41. GL_TEXTURE_MATERIAL_FACE_EXT = constant.Constant( 'GL_TEXTURE_MATERIAL_FACE_EXT', 0x8351 )
  42. GL_TEXTURE_MATERIAL_PARAMETER_EXT = constant.Constant( 'GL_TEXTURE_MATERIAL_PARAMETER_EXT', 0x8352 )
  43. glApplyTextureEXT = platform.createExtensionFunction( 
  44.     'glApplyTextureEXT', dll=platform.GL,
  45.     extension=EXTENSION_NAME,
  46.     resultType=None, 
  47.     argTypes=(constants.GLenum,),
  48.     doc = 'glApplyTextureEXT( GLenum(mode) ) -> None',
  49.     argNames = ('mode',),
  50. )
  51.  
  52. glTextureLightEXT = platform.createExtensionFunction( 
  53.     'glTextureLightEXT', dll=platform.GL,
  54.     extension=EXTENSION_NAME,
  55.     resultType=None, 
  56.     argTypes=(constants.GLenum,),
  57.     doc = 'glTextureLightEXT( GLenum(pname) ) -> None',
  58.     argNames = ('pname',),
  59. )
  60.  
  61. glTextureMaterialEXT = platform.createExtensionFunction( 
  62.     'glTextureMaterialEXT', dll=platform.GL,
  63.     extension=EXTENSION_NAME,
  64.     resultType=None, 
  65.     argTypes=(constants.GLenum, constants.GLenum,),
  66.     doc = 'glTextureMaterialEXT( GLenum(face), GLenum(mode) ) -> None',
  67.     argNames = ('face', 'mode',),
  68. )
  69.  
  70.  
  71. def glInitLightTextureEXT():
  72.     '''Return boolean indicating whether this extension is available'''
  73.     return extensions.hasGLExtension( EXTENSION_NAME )
  74.