~matobet/pyopengl/Python3

« back to all changes in this revision

Viewing changes to GL/EXT/stencil_wrap.py

  • Committer: matobet at gmail
  • Date: 2010-06-26 14:11:04 UTC
  • Revision ID: matobet@gmail.com-20100626141104-k011ofmltgiiu60g
Initial

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'''OpenGL extension EXT.stencil_wrap
 
2
 
 
3
This module customises the behaviour of the 
 
4
OpenGL.raw.GL.EXT.stencil_wrap to provide a more 
 
5
Python-friendly API
 
6
 
 
7
Overview (from the spec)
 
8
        
 
9
        Various algorithms use the stencil buffer to "count" the number of
 
10
        surfaces that a ray passes through.  As the ray passes into an object,
 
11
        the stencil buffer is incremented.  As the ray passes out of an object,
 
12
        the stencil buffer is decremented.
 
13
        
 
14
        GL requires that the stencil increment operation clamps to its maximum
 
15
        value.  For algorithms that depend on the difference between the sum
 
16
        of the increments and the sum of the decrements, clamping causes an
 
17
        erroneous result.
 
18
        
 
19
        This extension provides an enable for both maximum and minimum wrapping
 
20
        of stencil values.  Instead, the stencil value wraps in both directions.
 
21
        
 
22
        Two additional stencil operations are specified.  These new operations
 
23
        are similiar to the existing INCR and DECR operations, but they wrap
 
24
        their result instead of saturating it.  This functionality matches
 
25
        the new stencil operations introduced by DirectX 6.
 
26
 
 
27
The official definition of this extension is available here:
 
28
http://www.opengl.org/registry/specs/EXT/stencil_wrap.txt
 
29
'''
 
30
from OpenGL import platform, constants, constant, arrays
 
31
from OpenGL import extensions, wrapper
 
32
from OpenGL.GL import glget
 
33
import ctypes
 
34
from OpenGL.raw.GL.EXT.stencil_wrap import *
 
35
### END AUTOGENERATED SECTION
 
 
b'\\ No newline at end of file'