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_lod.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  2.1 KB  |  46 lines

  1. '''OpenGL extension SGIS.texture_lod
  2.  
  3. Overview (from the spec)
  4.     
  5.     This extension imposes two constraints related to the texture level of
  6.     detail parameter LOD, which is represented by the Greek character lambda
  7.     in the GL Specification.  One constraint clamps LOD to a specified
  8.     floating point range.  The other limits the selection of mipmap image
  9.     arrays to a subset of the arrays that would otherwise be considered.
  10.     
  11.     Together these constraints allow a large texture to be loaded and
  12.     used initially at low resolution, and to have its resolution raised
  13.     gradually as more resolution is desired or available.  Image array
  14.     specification is necessarily integral, rather than continuous.  By
  15.     providing separate, continuous clamping of the LOD parameter, it is
  16.     possible to avoid "popping" artifacts when higher resolution images
  17.     are provided.
  18.     
  19.     Note: because the shape of the mipmap array is always determined by
  20.     the dimensions of the level 0 array, this array must be loaded for
  21.     mipmapping to be active.  If the level 0 array is specified with a
  22.     null image pointer, however, no actual data transfer will take
  23.     place.  And a sufficiently tuned implementation might not even
  24.     allocate space for a level 0 array so specified until true image
  25.     data were presented.
  26.  
  27. The official definition of this extension is available here:
  28.     http://oss.sgi.com/projects/ogl-sample/registry/SGIS/texture_lod.txt
  29.  
  30. Automatically generated by the get_gl_extensions script, do not edit!
  31. '''
  32. from OpenGL import platform, constants, constant, arrays
  33. from OpenGL import extensions
  34. from OpenGL.GL import glget
  35. import ctypes
  36. EXTENSION_NAME = 'GL_SGIS_texture_lod'
  37. GL_TEXTURE_MIN_LOD_SGIS = constant.Constant( 'GL_TEXTURE_MIN_LOD_SGIS', 0x813A )
  38. GL_TEXTURE_MAX_LOD_SGIS = constant.Constant( 'GL_TEXTURE_MAX_LOD_SGIS', 0x813B )
  39. GL_TEXTURE_BASE_LEVEL_SGIS = constant.Constant( 'GL_TEXTURE_BASE_LEVEL_SGIS', 0x813C )
  40. GL_TEXTURE_MAX_LEVEL_SGIS = constant.Constant( 'GL_TEXTURE_MAX_LEVEL_SGIS', 0x813D )
  41.  
  42.  
  43. def glInitTextureLodSGIS():
  44.     '''Return boolean indicating whether this extension is available'''
  45.     return extensions.hasGLExtension( EXTENSION_NAME )
  46.