• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1XXX - Not complete yet!!!
2
3Name
4
5    EXT_index_func
6
7Name Strings
8
9    GL_EXT_index_func
10
11Version
12
13    $Date: 1996/11/21 00:52:23 $ $Revision: 1.3 $
14
15Number
16
17    95
18
19Dependencies
20
21    None
22
23Overview
24
25    This extension provides a way to discard fragments when a comparison
26    between the fragment's index value and a reference index fails.  This
27    may be used similarly to the alpha test which is available in RGBA mode.
28
29New Procedures and Functions
30
31    void IndexFuncEXT (enum func, float ref)
32
33New Tokens
34
35    Accepted by the <cap> parameter of Enable, Disable, and IsEnabled,
36    and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv,
37    and GetDoublev:
38
39        INDEX_TEST_EXT
40
41    Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
42    GetFloatv, and GetDoublev:
43
44        INDEX_TEST_FUNC_EXT
45        INDEX_TEST_REF_EXT
46
47Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
48
49    None
50
51Additions to Chapter 3 of the 1.1 Specification (Rasterization)
52
53    None
54
55Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations
56and the Frame Buffer)
57
58    A new section is added immediately following section 4.1.3 Alpha Test.
59
60    Index Test
61
62    This step applies only to color index mode.  The index test discards
63    a fragment conditional on the outcome of a comparison between the
64    incoming fragment's index value and a constant reference value.  The
65    comparison is enabled or disabled with the generic Enable and Disable
66    commands using the symbolic constant INDEX_TEST_EXT.  When disabled,
67    it is as if the comparison always passes.  The test is controlled with
68
69        void IndexFunc (enum func, float ref);
70
71    <func> is a symbolic constant indicating the index test function; <ref>
72    is a reference value.  <ref> is converted to a fixed-point value
73    according to the rules given for a color index in section 2.13.9.  For
74    purposes of the index test, the fragment's index value is also rounded
75    to the nearest integer representable in the color index portion of the
76    framebuffer.  The possible constants specifying the test function are
77    NEVER, ALWAYS, LESS, LEQUAL, EQUAL, GEQUAL, GREATER, or NOTEQUAL,
78    meaning pass the fragment never, always, if the fragment's index value
79    is less than, less than or equal to, equal to, greater than, or not
80    equal to the reference value, respectively.
81
82Additions to Chapter 5 of the 1.1 Specification (Special Functions)
83
84    None
85
86Additions to Chapter 6 of the 1.1 Specification (State and State Requests)
87
88    None
89
90Additions to the GLX Specification
91
92    XXX - Not complete yet!!!
93
94GLX Protocol
95
96    XXX - Not complete yet!!!
97
98Errors
99
100    INVALID_ENUM is generated if the <func> parameter of IndexFuncEXT
101    is not one of NEVER, ALWAYS, LESS, LEQUAL, EQUAL, GEQUAL, GREATER, or
102    NOTEQUAL.
103
104    INVALID_OPERATION is generated if IndexFuncEXT is called between
105    execution of Begin and corresponding execution of End.
106
107New State
108                                                                Initial
109    Get Value                           Get Command     Type    Value   Attrib
110    ---------                           -----------     ----    ------- ------
111
112    INDEX_TEST_EXT                      IsEnabled       B       False   color-buffer/enable
113    INDEX_TEST_FUNC_EXT                 GetFloatv       Z8      ALWAYS  color-buffer
114    INDEX_TEST_REF_EXT                  GetFloatv       R       0       color-buffer
115
116New Implementation Dependent State
117
118    None
119