15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    EXT_stencil_wrap
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_EXT_stencil_wrap
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Dale Kirkland, NVIDIA (dkirkland 'at' nvidia.com)
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciStatus
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    Shipping
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ciVersion
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ci    Date: 4/4/2002  Version 1.2
205bd8deadSopenharmony_ci
215bd8deadSopenharmony_ciNumber
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ci    176
245bd8deadSopenharmony_ci
255bd8deadSopenharmony_ciDependencies
265bd8deadSopenharmony_ci
275bd8deadSopenharmony_ci    None
285bd8deadSopenharmony_ci
295bd8deadSopenharmony_ciOverview
305bd8deadSopenharmony_ci
315bd8deadSopenharmony_ci    Various algorithms use the stencil buffer to "count" the number of
325bd8deadSopenharmony_ci    surfaces that a ray passes through.  As the ray passes into an object,
335bd8deadSopenharmony_ci    the stencil buffer is incremented.  As the ray passes out of an object,
345bd8deadSopenharmony_ci    the stencil buffer is decremented.
355bd8deadSopenharmony_ci
365bd8deadSopenharmony_ci    GL requires that the stencil increment operation clamps to its maximum
375bd8deadSopenharmony_ci    value.  For algorithms that depend on the difference between the sum
385bd8deadSopenharmony_ci    of the increments and the sum of the decrements, clamping causes an
395bd8deadSopenharmony_ci    erroneous result.
405bd8deadSopenharmony_ci
415bd8deadSopenharmony_ci    This extension provides an enable for both maximum and minimum wrapping
425bd8deadSopenharmony_ci    of stencil values.  Instead, the stencil value wraps in both directions.
435bd8deadSopenharmony_ci
445bd8deadSopenharmony_ci    Two additional stencil operations are specified.  These new operations
455bd8deadSopenharmony_ci    are similiar to the existing INCR and DECR operations, but they wrap
465bd8deadSopenharmony_ci    their result instead of saturating it.  This functionality matches
475bd8deadSopenharmony_ci    the new stencil operations introduced by DirectX 6.
485bd8deadSopenharmony_ci
495bd8deadSopenharmony_ciNew Procedures and Functions
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ci    None
525bd8deadSopenharmony_ci
535bd8deadSopenharmony_ciNew Tokens
545bd8deadSopenharmony_ci
555bd8deadSopenharmony_ci    Accepted by the <sfail>, <dpfail>, and <dppass> parameter of
565bd8deadSopenharmony_ci    StencilOp:
575bd8deadSopenharmony_ci
585bd8deadSopenharmony_ci        INCR_WRAP_EXT             0x8507
595bd8deadSopenharmony_ci        DECR_WRAP_EXT             0x8508
605bd8deadSopenharmony_ci
615bd8deadSopenharmony_ciAdditions to Chapter 2 of the GL Specification (OpenGL Operation)
625bd8deadSopenharmony_ci
635bd8deadSopenharmony_ci    None
645bd8deadSopenharmony_ci
655bd8deadSopenharmony_ciAdditions to Chapter 3 of the GL Specification (Rasterization)
665bd8deadSopenharmony_ci
675bd8deadSopenharmony_ci    None
685bd8deadSopenharmony_ci
695bd8deadSopenharmony_ciAdditions to Chapter 4 of the GL Specification (Per-Fragment Operations
705bd8deadSopenharmony_ciand the Framebuffer)
715bd8deadSopenharmony_ci
725bd8deadSopenharmony_ci    Section 4.1.4 "Stencil Test" (page 144), change the 3rd paragraph to read:
735bd8deadSopenharmony_ci
745bd8deadSopenharmony_ci    "...  The symbolic constants are KEEP, ZERO, REPLACE, INCR, DECR,
755bd8deadSopenharmony_ci    INVERT, INCR_WRAP_EXT, and DECR_WRAP_EXT.  The correspond to
765bd8deadSopenharmony_ci    keeping the current value, setting it to zero, replacing it with
775bd8deadSopenharmony_ci    the reference value, incrementing it with saturation, decrementing
785bd8deadSopenharmony_ci    it with saturation, bitwise inverting it, incrementing it without
795bd8deadSopenharmony_ci    saturation, and decrementing it without saturation.  For purposes of
805bd8deadSopenharmony_ci    incrementing and decrementing, the stencil bits are considered as an
815bd8deadSopenharmony_ci    unsigned integer.  Incrementing or decrementing with saturation will
825bd8deadSopenharmony_ci    clamp values at 0 and the maximum representable value.  Incrementing
835bd8deadSopenharmony_ci    or decrementing without saturation will wrap such that incrementing
845bd8deadSopenharmony_ci    the maximum representable value results in 0 and decrementing 0
855bd8deadSopenharmony_ci    results in the maximum representable value.  ..."
865bd8deadSopenharmony_ci
875bd8deadSopenharmony_ciAdditions to Chapter 5 of the GL Specification (Special Functions)
885bd8deadSopenharmony_ci
895bd8deadSopenharmony_ci    None
905bd8deadSopenharmony_ci
915bd8deadSopenharmony_ciAdditions to Chapter 6 of the GL Specification (State and State Requests)
925bd8deadSopenharmony_ci
935bd8deadSopenharmony_ci    None
945bd8deadSopenharmony_ci
955bd8deadSopenharmony_ciAdditions to the GLX Specification
965bd8deadSopenharmony_ci
975bd8deadSopenharmony_ci    None
985bd8deadSopenharmony_ci
995bd8deadSopenharmony_ciGLX Protocol
1005bd8deadSopenharmony_ci
1015bd8deadSopenharmony_ci    None
1025bd8deadSopenharmony_ci
1035bd8deadSopenharmony_ciErrors
1045bd8deadSopenharmony_ci
1055bd8deadSopenharmony_ci    INVALID_ENUM is generated by StencilOp if any of its parameters
1065bd8deadSopenharmony_ci    are not KEEP, ZERO, REPLACE, INCR, DECR, INVERT, INCR_WRAP_EXT,
1075bd8deadSopenharmony_ci    or DECR_WRAP_EXT.
1085bd8deadSopenharmony_ci
1095bd8deadSopenharmony_ciNew State
1105bd8deadSopenharmony_ci
1115bd8deadSopenharmony_ci(table 6.15, page 205)
1125bd8deadSopenharmony_ci    Get Value                 Type  Get Command   Initial Value   Sec    Attribute
1135bd8deadSopenharmony_ci    ------------------------  ----  ------------  -------------   -----  ---------
1145bd8deadSopenharmony_ci    STENCIL_FAIL               Z8   GetIntegerv        KEEP       4.1.4  stencil-buffer
1155bd8deadSopenharmony_ci    STENCIL_PASS_DEPTH_FAIL    Z8   GetIntegerv        KEEP       4.1.4  stencil-buffer
1165bd8deadSopenharmony_ci    STENCIL_PASS_DEPTH_PASS    Z8   GetIntegerv        KEEP       4.1.4  stencil-buffer
1175bd8deadSopenharmony_ci
1185bd8deadSopenharmony_ciNOTE: the only change is that Z6 type changes to Z8
1195bd8deadSopenharmony_ci
1205bd8deadSopenharmony_ciNew Implementation Dependent State
1215bd8deadSopenharmony_ci
1225bd8deadSopenharmony_ci    None
1235bd8deadSopenharmony_ci
1245bd8deadSopenharmony_ciRevision History
1255bd8deadSopenharmony_ci
1265bd8deadSopenharmony_ci  * Revision 1.2, April 4, 2002 - correct typo in New Tokens section.
1275bd8deadSopenharmony_ci    These are parameters to StencilOp, not BlendEquation.
128