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 / SGIX / fog_offset.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  1.5 KB  |  37 lines

  1. '''OpenGL extension SGIX.fog_offset
  2.  
  3. Overview (from the spec)
  4.     
  5.     This extension allows fragments to look brighter in a foggy
  6.     environment, by biasing the fragment eye-coordinate distance prior
  7.     to fog computation. A reference point in eye space (rx ry rz) and an offset
  8.     amount toward the viewpoint (f_o) are specified. When fog offset is
  9.     enabled, the offset amount will be subtracted from the fragment
  10.     distance, making objects appear less foggy.
  11.     
  12.     If fog computation is done in screen-space coordinates under
  13.     perspective projection, the reference point is used in adjusting the
  14.     fog offset to be correct for fragments whose depth is close to that
  15.     point. The reference point should be redefined when it becomes too
  16.     far away from the primitives being drawn. Under orthographic
  17.     projection, or if fog computation is done in eye-space coordinates,
  18.     the reference point is ignored.
  19.  
  20. The official definition of this extension is available here:
  21.     http://oss.sgi.com/projects/ogl-sample/registry/SGIX/fog_offset.txt
  22.  
  23. Automatically generated by the get_gl_extensions script, do not edit!
  24. '''
  25. from OpenGL import platform, constants, constant, arrays
  26. from OpenGL import extensions
  27. from OpenGL.GL import glget
  28. import ctypes
  29. EXTENSION_NAME = 'GL_SGIX_fog_offset'
  30. GL_FOG_OFFSET_SGIX = constant.Constant( 'GL_FOG_OFFSET_SGIX', 0x8198 )
  31. GL_FOG_OFFSET_VALUE_SGIX = constant.Constant( 'GL_FOG_OFFSET_VALUE_SGIX', 0x8199 )
  32.  
  33.  
  34. def glInitFogOffsetSGIX():
  35.     '''Return boolean indicating whether this extension is available'''
  36.     return extensions.hasGLExtension( EXTENSION_NAME )
  37.