• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    SGIX_pixel_texture
4
5Name Strings
6
7    GL_SGIX_pixel_texture
8
9Version
10
11    Last Modified Date: January 17, 2017
12
13Number
14
15    499
16    (previously #15a, which collided with SGIS_pixel_texture)
17
18Dependencies
19
20    None
21
22Overview
23
24    This extension allows the color components of pixel groups to be used as
25    texture coordinates, effectively converting a color image into a texture
26    coordinate image.  Because texture mapping is essentially a
27    multidimensional table lookup, this conversion supports multidimensional
28    color lookups for images.  Such multidimensional lookups can be used to
29    implement very accurate color space conversions.
30
31Issues
32
33    *	Should LOD be supported?
34
35New Procedures and Functions
36
37    void PixelTexGenSGIX(enum mode);
38
39New Tokens
40
41    Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, and
42    by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and
43    GetDoublev:
44
45        PIXEL_TEX_GEN_SGIX                      = 0x8139
46
47    Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv,
48    and GetDoublev:
49
50        PIXEL_TEX_GEN_MODE_SGIX                 = 0x832B
51
52Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
53
54    None
55
56Additions to Chapter 3 of the 1.0 Specification (Rasterization)
57
58    This extension modifies the "Conversion to Fragments" subsection of
59    section 3.6.3 (Rasterization of Pixel Rectangles) of the GL
60    Specification.  The paragraph beginning with "A fragment arising from a
61    group consisting of color data ..." is replaced by the following:
62
63    A fragment arising from a group consisting of color index data takes on
64    the color index of the group; the depth and texture coordinates are
65    taken from the current raster positions associated data.  Likewise, a
66    fragment arising from a depth component takes the component's depth
67    value; the color and texture coordinates are given by those associated
68    with the current raster position.  Groups arising from DrawPixels with a
69    <format> of STENCIL_INDEX are treated specially and are described in
70    section 4.3.1.
71
72    The treatment of fragments arising from groups consisting of RGBA color
73    data is affected by pixel texgen, which is enabled and disabled by
74    calling Enable and Disable with PIXEL_TEX_GEN_SGIX passed as the <cap>
75    parameter.
76
77    When pixel texgen enabled, a fragment arising from a group consisting of
78    RGBA color data takes its depth component from the current raster position
79    depth, and the texture coordinates are assigned as follows:
80
81      Pixel group's red becomes the fragment S texture coordinate
82      Pixel group's green becomes the fragment T texture coordinate
83      Pixel group's blue becomes the fragment R texture coordinate
84      Pixel group's alpha becomes the fragment Q texture coordinate
85
86    The assignment of the fragment color components is determined by value of
87    PIXEL_TEX_GEN_MODE_SGIX as defined as defined by the following table:
88
89      PIXEL_TEX_GEN_MODE_SGIX    Fragment's color component value
90      value		            R          G         B          A
91      -----------------------    -------    -------   -------    -------
92      NONE         	         PG's R     PG's G    PG's B     PG's A
93      ALPHA      	         PG's R     PG's G    PG's B     CRP's A
94      RGB			 CRP's R    CRP's G   CRP's B    PG's A
95      RGBA       	         CRP's R    CRP's G   CRP's B    CRP's A
96
97      Assignment of pixel group and current raster position color data to a
98      fragment arising from an RGBA color pixel group when pixel texgen is
99      enabled.  The value of PIXEL_TEX_GEN_MODE_SGIX in the first column
100      controls the assignment of fragment color components in second thru the
101      fifth columns.  PG, CRP, R, G, B, A are abbreviations of "current raster
102      position", "pixel group", "red", "green", "blue", and "alpha"
103      respectively.
104
105    The <mode> parameter of PixelTexGenSGIX is used to set the value of
106    PIXEL_TEX_GEN_MODE_SGIX.  (It is NONE by default.)
107
108Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations
109and the Frame Buffer)
110
111    The operation of pixel texgen during pixel copy operations is
112    identical to the operation during pixel drawing.  Because PixelTexGenSGIX
113    defines the rasterization of pixel groups, it has no effect on texture
114    definitions or on pixel query (ReadPixels) operations.
115
116Additions to Chapter 5 of the 1.0 Specification (Special Functions)
117
118    None
119
120Additions to Chapter 6 of the 1.0 Specification (State and State Requests)
121
122    None
123
124Additions to the GLX Specification
125
126    None
127
128Errors
129
130    INVALID_ENUM is generated if PixelTexGenSGIX parameter <mode> is not NONE,
131    ALPHA, RGB, or RGBA.
132
133    INVALID_OPERATION is generated if PixelTexGenSGIX is called between
134    execution of Begin and the execution of the corresponding End.
135
136New State
137
138    Get Value			Get Command	Type	Initial Value	Attrib
139    ---------			-----------	----	-------------	------
140    PIXEL_TEX_GEN_SGIX		IsEnabled	B	FALSE		pixel
141    PIXEL_TEX_GEN_MODE_SGIX	GetIntegerv	Z4	NONE		pixel
142
143New Implementation Dependent State
144
145    None
146