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 / SGIS / texture_select.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  3.2 KB  |  61 lines

  1. '''OpenGL extension SGIS.texture_select
  2.  
  3. Overview (from the spec)
  4.     
  5.     This extension introduces several new texture internal formats.  The
  6.     purpose of these new formats is to reorganize the components of a
  7.     texture into groups of components.  The currently selected group
  8.     effectively becomes the internal format.
  9.     
  10.     Also, two new texture parameters are introduced that control the
  11.     selection of these groups of components.
  12.     
  13.     For example, assume a texture internal format of DUAL_LUMINANCE4_SGIS is
  14.     specified.  Now there are two groups of components, where each group has
  15.     a format of LUMINANCE4.  One of the two LUMINANCE groups is always
  16.     selected.  components can be selected and then interpreted as a LUMINANCE
  17.     texture.
  18.     
  19.     The purpose of this extension is allow better utilization of texture
  20.     memory by subdividing the internal representation of a texel into 1, 2,
  21.     or 4 smaller texels.  Additionally, this may improve performance of
  22.     texture downloads.
  23.  
  24. The official definition of this extension is available here:
  25.     http://oss.sgi.com/projects/ogl-sample/registry/SGIS/texture_select.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_SGIS_texture_select'
  34. GL_DUAL_ALPHA4_SGIS = constant.Constant( 'GL_DUAL_ALPHA4_SGIS', 0x8110 )
  35. GL_DUAL_ALPHA8_SGIS = constant.Constant( 'GL_DUAL_ALPHA8_SGIS', 0x8111 )
  36. GL_DUAL_ALPHA12_SGIS = constant.Constant( 'GL_DUAL_ALPHA12_SGIS', 0x8112 )
  37. GL_DUAL_ALPHA16_SGIS = constant.Constant( 'GL_DUAL_ALPHA16_SGIS', 0x8113 )
  38. GL_DUAL_LUMINANCE4_SGIS = constant.Constant( 'GL_DUAL_LUMINANCE4_SGIS', 0x8114 )
  39. GL_DUAL_LUMINANCE8_SGIS = constant.Constant( 'GL_DUAL_LUMINANCE8_SGIS', 0x8115 )
  40. GL_DUAL_LUMINANCE12_SGIS = constant.Constant( 'GL_DUAL_LUMINANCE12_SGIS', 0x8116 )
  41. GL_DUAL_LUMINANCE16_SGIS = constant.Constant( 'GL_DUAL_LUMINANCE16_SGIS', 0x8117 )
  42. GL_DUAL_INTENSITY4_SGIS = constant.Constant( 'GL_DUAL_INTENSITY4_SGIS', 0x8118 )
  43. GL_DUAL_INTENSITY8_SGIS = constant.Constant( 'GL_DUAL_INTENSITY8_SGIS', 0x8119 )
  44. GL_DUAL_INTENSITY12_SGIS = constant.Constant( 'GL_DUAL_INTENSITY12_SGIS', 0x811A )
  45. GL_DUAL_INTENSITY16_SGIS = constant.Constant( 'GL_DUAL_INTENSITY16_SGIS', 0x811B )
  46. GL_DUAL_LUMINANCE_ALPHA4_SGIS = constant.Constant( 'GL_DUAL_LUMINANCE_ALPHA4_SGIS', 0x811C )
  47. GL_DUAL_LUMINANCE_ALPHA8_SGIS = constant.Constant( 'GL_DUAL_LUMINANCE_ALPHA8_SGIS', 0x811D )
  48. GL_QUAD_ALPHA4_SGIS = constant.Constant( 'GL_QUAD_ALPHA4_SGIS', 0x811E )
  49. GL_QUAD_ALPHA8_SGIS = constant.Constant( 'GL_QUAD_ALPHA8_SGIS', 0x811F )
  50. GL_QUAD_LUMINANCE4_SGIS = constant.Constant( 'GL_QUAD_LUMINANCE4_SGIS', 0x8120 )
  51. GL_QUAD_LUMINANCE8_SGIS = constant.Constant( 'GL_QUAD_LUMINANCE8_SGIS', 0x8121 )
  52. GL_QUAD_INTENSITY4_SGIS = constant.Constant( 'GL_QUAD_INTENSITY4_SGIS', 0x8122 )
  53. GL_QUAD_INTENSITY8_SGIS = constant.Constant( 'GL_QUAD_INTENSITY8_SGIS', 0x8123 )
  54. GL_DUAL_TEXTURE_SELECT_SGIS = constant.Constant( 'GL_DUAL_TEXTURE_SELECT_SGIS', 0x8124 )
  55. GL_QUAD_TEXTURE_SELECT_SGIS = constant.Constant( 'GL_QUAD_TEXTURE_SELECT_SGIS', 0x8125 )
  56.  
  57.  
  58. def glInitTextureSelectSGIS():
  59.     '''Return boolean indicating whether this extension is available'''
  60.     return extensions.hasGLExtension( EXTENSION_NAME )
  61.