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 / stencil_wrap.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  1.6 KB  |  40 lines

  1. '''OpenGL extension EXT.stencil_wrap
  2.  
  3. Overview (from the spec)
  4.     
  5.     Various algorithms use the stencil buffer to "count" the number of
  6.     surfaces that a ray passes through.  As the ray passes into an object,
  7.     the stencil buffer is incremented.  As the ray passes out of an object,
  8.     the stencil buffer is decremented.
  9.     
  10.     GL requires that the stencil increment operation clamps to its maximum
  11.     value.  For algorithms that depend on the difference between the sum
  12.     of the increments and the sum of the decrements, clamping causes an
  13.     erroneous result.
  14.     
  15.     This extension provides an enable for both maximum and minimum wrapping
  16.     of stencil values.  Instead, the stencil value wraps in both directions.
  17.     
  18.     Two additional stencil operations are specified.  These new operations
  19.     are similiar to the existing INCR and DECR operations, but they wrap
  20.     their result instead of saturating it.  This functionality matches
  21.     the new stencil operations introduced by DirectX 6.
  22.  
  23. The official definition of this extension is available here:
  24.     http://oss.sgi.com/projects/ogl-sample/registry/EXT/stencil_wrap.txt
  25.  
  26. Automatically generated by the get_gl_extensions script, do not edit!
  27. '''
  28. from OpenGL import platform, constants, constant, arrays
  29. from OpenGL import extensions
  30. from OpenGL.GL import glget
  31. import ctypes
  32. EXTENSION_NAME = 'GL_EXT_stencil_wrap'
  33. GL_INCR_WRAP_EXT = constant.Constant( 'GL_INCR_WRAP_EXT', 0x8507 )
  34. GL_DECR_WRAP_EXT = constant.Constant( 'GL_DECR_WRAP_EXT', 0x8508 )
  35.  
  36.  
  37. def glInitStencilWrapEXT():
  38.     '''Return boolean indicating whether this extension is available'''
  39.     return extensions.hasGLExtension( EXTENSION_NAME )
  40.