• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    SGIX_texture_coordinate_clamp
4
5Name Strings
6
7    GL_SGIX_texture_coordinate_clamp
8
9Version
10
11    $Date: 1998/03/10 06:23:31 $ $Revision: 1.2 $
12
13Number
14
15    235
16
17Dependencies
18
19    EXT_texture3D affects the definition of this extension
20
21Overview
22
23    This extension provides a mechanism to specify the maximum texture coordinate
24    clamping values. Standard OpenGL always clamps the upper bound to 1.0 when
25    the wrap mode is set to CLAMP. This mechanism can be used to  guarantee
26    that non-existent texel data will not be accessed when the texture image has
27    dimensions that are not a power of 2.
28
29Issues
30
31    *	What is the effect of wrap modes?
32        -- This mode is only effective when the wrap mode is set to clamp
33
34    *   Are border modes supported?
35	-- Border modes are independent of texture coordinate clamping. Borders
36	   live outside the 0.0 to 1.0 texture coordinate range. However, a
37	   particular filtering method may access texels beyond the clamped
38	   values. It is the users responsibility to ensure that adequate
39	   texels are defined or to set the border mode to CLAMP_TO_EDGE_SGIS
40	   to prevent access outside this range. The texel value used past
41	   the clamped edge is otherwise undefined.
42
43    *   Can defining the clamp values before the texture is defined be used to
44	allocate less texture memory for the texture?
45	-- Maybe. This is an implementation issue that the hardware may or may
46	   not take advantage of. However, the clamp value may be increased
47	   later to download data into a larger region.
48
49    *   Does subloading a texture image to a region outside the clamped area
50	preserve the contents in the outside area?
51	-- Yes. Downloading texels outside the clamped region should make the
52	   data be preserved.
53
54    *   Only the upper limit of the clamp region may be specified. Might
55	other more generic needs be met by allowing both min and max to be
56	defined? For example, you could define a large texture of smaller
57	"tiles" that could be selected for various surfaces.
58	-- Intel has a pending spec to do texture clipping. This is somewhat
59	   similar to what is mentioned above. This extension defines a
60	   mechanism to clamp and also provides a hint to the size of the
61	   texture to be allocated.
62
63    *   Since wrapped textures aren't supported, the only real functionality
64	this appears to add is when the geometry (s,t,r) ranges are not
65	aligned with or matching the (x,y,z) ranges. For example, mapping
66	video to a sphere.  Is this correct? Otherwise, one could just define
67	a rectangle with the right (s,t) ranges.
68	-- Yes. However that does not provide OpenGL any hint as to the size
69	   of texture that actually needs to be allocated.
70
71New Procedures and Functions
72
73    None
74
75New Tokens
76
77    Accepted by the <pname> parameter of TexParameteri, TexParameterf,
78    TexParameteriv, TexParameterfv, GetTexParameteriv, and GetTexParameterfv:
79
80	TEXTURE_MAX_CLAMP_S_SGIX	0x8369
81	TEXTURE_MAX_CLAMP_T_SGIX	0x836A
82	TEXTURE_MAX_CLAMP_R_SGIX	0x836B
83
84
85Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
86
87    None
88
89Additions to Chapter 3 of the 1.1 Specification (Rasterization)
90
91    GL Specification Table 3.9 is updated as follows:
92
93	Name				Type	    Legal Values
94	----				----	    ------------
95	TEXTURE_WRAP_S			integer	    CLAMP, REPEAT
96	TEXTURE_WRAP_T			integer	    CLAMP, REPEAT
97	TEXTURE_WRAP_R_EXT		integer	    CLAMP, REPEAT
98	TEXTURE_MIN_FILTER		integer	    NEAREST, LINEAR,
99						    NEAREST_MIPMAP_NEAREST,
100						    NEAREST_MIPMAP_LINEAR,
101						    LINEAR_MIPMAP_NEAREST,
102						    LINEAR_MIPMAP_LINEAR,
103						    FILTER4_SGIS,
104						    LINEAR_CLIPMAP_LINEAR_SGIX,
105	TEXTURE_MAG_FILTER		integer	    NEAREST, LINEAR,
106						    FILTER4_SGIS,
107						    LINEAR_DETAIL_SGIS,
108						    LINEAR_DETAIL_ALPHA_SGIS,
109						    LINEAR_DETAIL_COLOR_SGIS,
110						    LINEAR_SHARPEN_SGIS,
111						    LINEAR_SHARPEN_ALPHA_SGIS,
112						    LINEAR_SHARPEN_COLOR_SGIS
113	TEXTURE_BORDER_COLOR		4 floats    any 4 values in [0,1]
114	DETAIL_TEXTURE_LEVEL_SGIS	integer	    any non-negative integer
115	DETAIL_TEXTURE_MODE_SGIS	integer	    ADD, MODULATE
116	TEXTURE_MIN_LOD_SGIS		float	    any value
117	TEXTURE_MAX_LOD_SGIS		float	    any value
118	TEXTURE_BASE_LEVEL_SGIS		integer	    any non-negative integer
119	TEXTURE_MAX_LEVEL_SGIS		integer	    any non-negative integer
120        GENERATE_MIPMAP_SGIS            boolean     TRUE or FALSE
121        TEXTURE_CLIPMAP_FRAME_SGIX      float       any non-negative value
122        TEXTURE_CLIPMAP_CENTER_SGIX     2 integers  any 2 non-negative integers
123        TEXTURE_CLIPMAP_OFFSET_SGIX     2 integers  any 2 non-negative integers
124        TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 3 integers  any 3 non-negative integer
125	TEXTURE_LOD_BIAS_S_SGIX		float	    any value
126	TEXTURE_LOD_BIAS_T_SGIX		float	    any value
127	TEXTURE_LOD_BIAS_R_SGIX		float	    any value
128        TEXTURE_MIPMAP_ANISOTROPY	int	    any value >= 1
129        TEXTURE_MAX_CLAMP_S_SGIX	float	    any value in [0.0, 1.0]
130        TEXTURE_MAX_CLAMP_T_SGIX	float	    any value in [0.0, 1.0]
131        TEXTURE_MAX_CLAMP_R_SGIX	float	    any value in [0.0, 1.0]
132
133	Table 3.9: Texture parameters and their values.
134
135    Texture Minification
136    --------------------
137    Let s(x,y) be the function that associates an s texture coordinate with each
138    set of window coordinates (x,y) that lie within a primitive; define t(x, y)
139    analogously. Let
140
141                / 2^n.TEXTURE_MAX_CLAMP_S_SGIX  if (TEXTURE_WRAP_S == CLAMP and
142      u(x,y) = (                                    s(x,y) > TEXTURE_MAX_CLAMP_S_SGIX)
143	        \ 2^n.s(x,y),		 	otherwise
144
145
146                / 2^n.TEXTURE_MAX_CLAMP_T_SGIX  if (TEXTURE_WRAP_T == CLAMP and
147      v(x,y) = (                                    t(x,y) > TEXTURE_MAX_CLAMP_T_SGIX)
148	        \ 2^n.t(x,y),		 	otherwise
149
150    and
151
152                / 2^n.TEXTURE_MAX_CLAMP_R_SGIX  if (TEXTURE_WRAP_R == CLAMP and
153      w(x,y) = (                                    r(x,y) > TEXTURE_MAX_CLAMP_R_SGIX)
154	        \ 2^n.r(x,y),		 	otherwise
155
156    (For a one-dimensional texture, define v(x,y) = 0, w(x,y) = 0)
157
158
159    Query support
160    -------------
161    In the initial state the values assigned to TEXTURE_MAX_CLAMP_S_SGIX,
162    TEXTURE_MAX_CLAMP_T_SGIX and TEXTURE_MAX_CLAMP_R_SGIX are 1.0, 1.0, 1.0
163    respectively.
164
165
166Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations
167and the Frame Buffer)
168
169    None
170
171Additions to Chapter 5 of the 1.1 Specification (Special Functions)
172
173    None
174
175Additions to Chapter 6 of the 1.1 Specification (State and State Requests)
176
177    None
178
179Additions to the GLX Specification
180
181    None
182
183Dependencies on EXT_texture3D
184
185    If EXT_texture3D is not implemented, then the reference to clamping of 3D
186    texture coordinates in this file are invalid, and references to
187    TEXTURE_MAX_CLAMP_R_SGIX should be ignored.
188
189Errors
190
191    None
192
193New State
194
195								Initial
196    Get Value			   Get Command	    Type	Value	 Attrib
197    ---------			   -----------	    ----	-------	 ------
198    TEXTURE_MAX_CLAMP_S_SGIX      GetTexParameteriv R          1.0  	texture
199    TEXTURE_MAX_CLAMP_T_SGIX      GetTexParameteriv R          1.0  	texture
200    TEXTURE_MAX_CLAMP_R_SGIX      GetTexParameteriv R          1.0  	texture
201
202New Implementation Dependent State
203
204    None
205