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 / texture.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  4.9 KB  |  88 lines

  1. '''OpenGL extension EXT.texture
  2.  
  3. Overview (from the spec)
  4.     
  5.     The original intention of this extension was simply to support various
  6.     numeric resolutions of color components in texture images.  While it
  7.     accomplishes this, it also accomplishes a larger task, that of
  8.     formalizing the notion of an internal format for images, corresponding
  9.     to the external format that already existed for image data in host
  10.     memory.  This notion of an internal image format will be used
  11.     extensively in later extensions, especially those concerned with pixel
  12.     manipulation.
  13.     
  14.     The idea of an internal format is simple: rather than treating a
  15.     retained image as having 1, 2, 3, or 4 components, treat it as though
  16.     it has a specific format, such as LUMINANCE_ALPHA, or just ALPHA.  Then
  17.     define the semantics of the use of internal images with these formats in
  18.     a consistent way.  Because texture mapping is already defined in GL, the
  19.     semantics for internal-format images were chosen to match those of the 1,
  20.     2, 3, and 4 component internal images that already existed.  The new
  21.     semantics are a superset of the old ones, however, so this extension
  22.     adds capabilities to GL, as well as allowing internal resolutions to be
  23.     specified.
  24.     
  25.     This extension also defines a robust method for applications to
  26.     determine what combinations of texture dimensions and resolutions are
  27.     supported by an implementation.  It also introduces a new texture
  28.     environment: REPLACE_EXT.
  29.  
  30. The official definition of this extension is available here:
  31.     http://oss.sgi.com/projects/ogl-sample/registry/EXT/texture.txt
  32.  
  33. Automatically generated by the get_gl_extensions script, do not edit!
  34. '''
  35. from OpenGL import platform, constants, constant, arrays
  36. from OpenGL import extensions
  37. from OpenGL.GL import glget
  38. import ctypes
  39. EXTENSION_NAME = 'GL_EXT_texture'
  40. GL_ALPHA4_EXT = constant.Constant( 'GL_ALPHA4_EXT', 0x803B )
  41. GL_ALPHA8_EXT = constant.Constant( 'GL_ALPHA8_EXT', 0x803C )
  42. GL_ALPHA12_EXT = constant.Constant( 'GL_ALPHA12_EXT', 0x803D )
  43. GL_ALPHA16_EXT = constant.Constant( 'GL_ALPHA16_EXT', 0x803E )
  44. GL_LUMINANCE4_EXT = constant.Constant( 'GL_LUMINANCE4_EXT', 0x803F )
  45. GL_LUMINANCE8_EXT = constant.Constant( 'GL_LUMINANCE8_EXT', 0x8040 )
  46. GL_LUMINANCE12_EXT = constant.Constant( 'GL_LUMINANCE12_EXT', 0x8041 )
  47. GL_LUMINANCE16_EXT = constant.Constant( 'GL_LUMINANCE16_EXT', 0x8042 )
  48. GL_LUMINANCE4_ALPHA4_EXT = constant.Constant( 'GL_LUMINANCE4_ALPHA4_EXT', 0x8043 )
  49. GL_LUMINANCE6_ALPHA2_EXT = constant.Constant( 'GL_LUMINANCE6_ALPHA2_EXT', 0x8044 )
  50. GL_LUMINANCE8_ALPHA8_EXT = constant.Constant( 'GL_LUMINANCE8_ALPHA8_EXT', 0x8045 )
  51. GL_LUMINANCE12_ALPHA4_EXT = constant.Constant( 'GL_LUMINANCE12_ALPHA4_EXT', 0x8046 )
  52. GL_LUMINANCE12_ALPHA12_EXT = constant.Constant( 'GL_LUMINANCE12_ALPHA12_EXT', 0x8047 )
  53. GL_LUMINANCE16_ALPHA16_EXT = constant.Constant( 'GL_LUMINANCE16_ALPHA16_EXT', 0x8048 )
  54. GL_INTENSITY_EXT = constant.Constant( 'GL_INTENSITY_EXT', 0x8049 )
  55. GL_INTENSITY4_EXT = constant.Constant( 'GL_INTENSITY4_EXT', 0x804A )
  56. GL_INTENSITY8_EXT = constant.Constant( 'GL_INTENSITY8_EXT', 0x804B )
  57. GL_INTENSITY12_EXT = constant.Constant( 'GL_INTENSITY12_EXT', 0x804C )
  58. GL_INTENSITY16_EXT = constant.Constant( 'GL_INTENSITY16_EXT', 0x804D )
  59. GL_RGB2_EXT = constant.Constant( 'GL_RGB2_EXT', 0x804E )
  60. GL_RGB4_EXT = constant.Constant( 'GL_RGB4_EXT', 0x804F )
  61. GL_RGB5_EXT = constant.Constant( 'GL_RGB5_EXT', 0x8050 )
  62. GL_RGB8_EXT = constant.Constant( 'GL_RGB8_EXT', 0x8051 )
  63. GL_RGB10_EXT = constant.Constant( 'GL_RGB10_EXT', 0x8052 )
  64. GL_RGB12_EXT = constant.Constant( 'GL_RGB12_EXT', 0x8053 )
  65. GL_RGB16_EXT = constant.Constant( 'GL_RGB16_EXT', 0x8054 )
  66. GL_RGBA2_EXT = constant.Constant( 'GL_RGBA2_EXT', 0x8055 )
  67. GL_RGBA4_EXT = constant.Constant( 'GL_RGBA4_EXT', 0x8056 )
  68. GL_RGB5_A1_EXT = constant.Constant( 'GL_RGB5_A1_EXT', 0x8057 )
  69. GL_RGBA8_EXT = constant.Constant( 'GL_RGBA8_EXT', 0x8058 )
  70. GL_RGB10_A2_EXT = constant.Constant( 'GL_RGB10_A2_EXT', 0x8059 )
  71. GL_RGBA12_EXT = constant.Constant( 'GL_RGBA12_EXT', 0x805A )
  72. GL_RGBA16_EXT = constant.Constant( 'GL_RGBA16_EXT', 0x805B )
  73. GL_TEXTURE_RED_SIZE_EXT = constant.Constant( 'GL_TEXTURE_RED_SIZE_EXT', 0x805C )
  74. GL_TEXTURE_GREEN_SIZE_EXT = constant.Constant( 'GL_TEXTURE_GREEN_SIZE_EXT', 0x805D )
  75. GL_TEXTURE_BLUE_SIZE_EXT = constant.Constant( 'GL_TEXTURE_BLUE_SIZE_EXT', 0x805E )
  76. GL_TEXTURE_ALPHA_SIZE_EXT = constant.Constant( 'GL_TEXTURE_ALPHA_SIZE_EXT', 0x805F )
  77. GL_TEXTURE_LUMINANCE_SIZE_EXT = constant.Constant( 'GL_TEXTURE_LUMINANCE_SIZE_EXT', 0x8060 )
  78. GL_TEXTURE_INTENSITY_SIZE_EXT = constant.Constant( 'GL_TEXTURE_INTENSITY_SIZE_EXT', 0x8061 )
  79. GL_REPLACE_EXT = constant.Constant( 'GL_REPLACE_EXT', 0x8062 )
  80. GL_PROXY_TEXTURE_1D_EXT = constant.Constant( 'GL_PROXY_TEXTURE_1D_EXT', 0x8063 )
  81. GL_PROXY_TEXTURE_2D_EXT = constant.Constant( 'GL_PROXY_TEXTURE_2D_EXT', 0x8064 )
  82. GL_TEXTURE_TOO_LARGE_EXT = constant.Constant( 'GL_TEXTURE_TOO_LARGE_EXT', 0x8065 )
  83.  
  84.  
  85. def glInitTextureEXT():
  86.     '''Return boolean indicating whether this extension is available'''
  87.     return extensions.hasGLExtension( EXTENSION_NAME )
  88.