1Name 2 3 NV_texture_rectangle 4 5Name Strings 6 7 GL_NV_texture_rectangle 8 9Contact 10 11 Mark J. Kilgard, NVIDIA Corporation (mjk 'at' nvidia.com) 12 13Notice 14 15 Copyright NVIDIA Corporation, 2000, 2001, 2002, 2003, 2004. 16 17Status 18 19 Implemented in NVIDIA's Release 10 drivers. 20 21Version 22 23 NVIDIA Date: March 5, 2004 24 25Number 26 27 229 28 29Dependencies 30 31 Written based on the OpenGL 1.2.1 specification including 32 ARB_texture_cube_map wording. 33 34 IBM_mirrored_repeat affects the definition of this extension. 35 36 ARB_texture_border_clamp affects the definition of this extension. 37 38 EXT_paletted_texture affects the definition of this extension. 39 40 This extension affects the definition of the NV_texture_shader 41 extension. 42 43Overview 44 45 OpenGL texturing is limited to images with power-of-two dimensions 46 and an optional 1-texel border. NV_texture_rectangle extension 47 adds a new texture target that supports 2D textures without requiring 48 power-of-two dimensions. 49 50 Non-power-of-two dimensioned textures are useful for storing 51 video images that do not have power-of-two dimensions. Re-sampling 52 artifacts are avoided and less texture memory may be required by using 53 non-power-of-two dimensioned textures. Non-power-of-two dimensioned 54 textures are also useful for shadow maps and window-space texturing. 55 56 However, non-power-of-two dimensioned (NPOTD) textures have 57 limitations that do not apply to power-of-two dimensioned (POT) 58 textures. NPOTD textures may not use mipmap filtering; POTD 59 textures support both mipmapped and non-mipmapped filtering. 60 NPOTD textures support only the GL_CLAMP, GL_CLAMP_TO_EDGE, 61 and GL_CLAMP_TO_BORDER_ARB wrap modes; POTD textures support 62 GL_CLAMP_TO_EDGE, GL_REPEAT, GL_CLAMP, GL_MIRRORED_REPEAT_IBM, 63 and GL_CLAMP_TO_BORDER. NPOTD textures do not support an optional 64 1-texel border; POTD textures do support an optional 1-texel border. 65 66 NPOTD textures are accessed by non-normalized texture coordinates. 67 So instead of thinking of the texture image lying in a [0..1]x[0..1] 68 range, the NPOTD texture image lies in a [0..w]x[0..h] range. 69 70 This extension adds a new texture target and related state (proxy, 71 binding, max texture size). 72 73Issues 74 75 Should rectangular textures simply be an extension to the 2D texture 76 target that allows non-power-of-two widths and heights? 77 78 RESOLUTION: No. The rectangular texture is an entirely new texture 79 target type called GL_TEXTURE_RECTANGLE_NV. This is because while 80 the texture rectangle target relaxes the power-of-two dimensions 81 requirements of the texture 2D target, it also has limitations 82 such as the absence of both mipmapping and the GL_REPEAT and 83 GL_MIRRORED_REPEAT_IBM wrap modes. Additionally, rectangular 84 textures do not use [0..1] normalized texture coordinates. 85 86 How is the image of a rectangular texture specified? 87 88 RESOLUTION: Using the standard OpenGL API for specifying a 2D 89 texture image: glTexImage2D, glSubTexImage2D, glCopyTexImage2D, 90 and glCopySubTexImage2D. The target for these commands is 91 GL_TEXTURE_RECTANGLE_NV though. 92 93 This is similar to how the ARB_texture_cube_map extension uses 94 the 2D texture image specification API though with its own texture 95 target. 96 97 Should 3D textures be allowed to be NPOTD? 98 99 RESOLUTION: No. That should be left to another extension. 100 101 Should cube map textures be allowed to be NPOTD? 102 103 RESOLUTION: No. Probably not particularly interesting for 104 cube maps. If it becomes important, another extension should 105 provide NPOTD cube maps. 106 107 Should 1D textures be allowed to be NPOTD? 108 109 RESOLUTION: No. Rectangular textures are always considered 2D 110 by this extension. You can always simulate a 1D NPOTD textures 111 by using a 2D Wx1 or 1xH dimensioned rectangular texture. 112 113 Should anything be said about performance? 114 115 RESOLUTION: No, but developers should not be surprised if 116 conventional POTD textures will render slightly faster than NPOTD 117 textures. This is particularly likely to be true when NPOTD 118 textures are minified leading to texture cache thrashing. 119 120 How are rectangular textures enabled? 121 122 RESOLUTION: Since rectangular textures add a new texture target, 123 you enable rectangular textures by enabling this target. Example: 124 125 glEnable(GL_TEXTURE_RECTANGLE_NV); 126 127 What is the priority of the rectangular texture target enable relative to 128 existing texture enables? 129 130 RESOLUTION: The texture rectangle target is like a 2D texture in 131 many ways so its enable priority is just above GL_TEXTURE_2D. From 132 lowest priority to highest priority: GL_TEXTURE_1D, GL_TEXTURE_2D, 133 GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_3D, GL_TEXTURE_CUBE_MAP_ARB. 134 135 What is the default wrap state for a texture rectangle? 136 137 RESOLUTION: GL_CLAMP_TO_EDGE. The normal default wrap state is 138 GL_REPEAT, but that mode is not allowed for rectangular textures? 139 140 What is the default minification filter for a texture rectangle? 141 142 RESOLUTION: GL_LINEAR. The normal default minification filter 143 state is GL_NEAREST_MIPMAP_LINEAR, but that mode is not allowed 144 for rectangular textures because mipmapping is not supported. 145 146 Do paletted textures work with rectangular textures? 147 148 RESOLUTION: No. Similar (but not identical) functionality can 149 be accomplished using dependent texture shader operations (see 150 NV_texture_shader). 151 152 The difference between paletted texture accesses and dependent 153 texture accesses is that paletted texture lookups are 154 "pre-filtering" while dependent texture shader operations are 155 "post-filtering". 156 157 Can compressed texture images be specified for a rectangular texture? 158 159 RESOLUTION: The generic texture compression internal formats 160 introduced by ARB_texture_compression are supported for rectangular 161 textures because the image is not presented as compressed data and 162 the ARB_texture_compression extension always permits generic texture 163 compression internal formats to be stored in uncompressed form. 164 Implementations are free to support generic compression internal 165 formats for rectangular textures if supported but such support is 166 not required. 167 168 This extensions makes a blanket statement that specific compressed 169 internal formats for use with CompressedTexImage<n>DARB are NOT 170 supported for rectangular textures. This is because several 171 existing hardware implementations of texture compression formats 172 such as S3TC are not designed for compressing rectangular textures. 173 This does not preclude future texture compression extensions from 174 supporting compressed internal formats that do work with rectangular 175 extensions (by relaxing the current blanket error condition). 176 177 Does this extension work with SGIX_shadow-style shadow mapping? 178 179 RESOLUTION: Yes. The one non-obvious allowance to support 180 SGIX_shadow-style shadow mapping is that the R texture coordinate 181 wrap mode remains UNCHANGED for rectangular textures. Clamping of 182 the R texture coordinate for rectangular textures uses the standard 183 [0,1] interval rather than the [0,ws] or [0,hs] intervals as in 184 the case of S and T. This is because R represents a depth value 185 in the [0,1] range whether using a 2D or rectangular texture. 186 187New Procedures and Functions 188 189 None 190 191New Tokens 192 193 Accepted by the <cap> parameter of Enable, Disable, IsEnabled, and 194 by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, 195 and GetDoublev, and by the <target> parameter of BindTexture, 196 GetTexParameterfv, GetTexParameteriv, TexParameterf, TexParameteri, 197 TexParameterfv, and TexParameteriv: 198 199 TEXTURE_RECTANGLE_NV 0x84F5 200 201 Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, 202 GetFloatv, and GetDoublev: 203 204 TEXTURE_BINDING_RECTANGLE_NV 0x84F6 205 206 Accepted by the <target> parameter of GetTexImage, 207 GetTexLevelParameteriv, GetTexLevelParameterfv, TexImage2D, 208 CopyTexImage2D, TexSubImage2D, and CopySubTexImage2D: 209 210 TEXTURE_RECTANGLE_NV 211 212 Accepted by the <target> parameter of GetTexLevelParameteriv, 213 GetTexLevelParameterfv, GetTexParameteriv, and TexImage2D: 214 215 PROXY_TEXTURE_RECTANGLE_NV 0x84F7 216 217 Accepted by the <pname> parameter of GetBooleanv, GetDoublev, 218 GetIntegerv, and GetFloatv: 219 220 MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 221 222Additions to Chapter 2 of the GL Specification (OpenGL Operation) 223 224 None 225 226Additions to Chapter 3 of the GL Specification (Rasterization) 227 228 -- Section 3.6.3 "Pixel Transfer Modes" under "Color Table 229 Specification" or the ColorTableEXT description in the 230 EXT_paletted_texture specification (rev 1.2) 231 232 Add the following statement after introducing ColorTableEXT: 233 234 "The error INVALID_ENUM is generated if the target to ColorTable (or 235 ColorTableEXT or the various ColorTable and ColorTableEXT alternative 236 commands) is TEXTURE_RECTANGLE_NV or PROXY_TEXTURE_RECTANGLE_NV." 237 238 -- Section 3.8.1 "Texture Image Specification" 239 240 Change the second sentence through the rest of the paragraph 241 describing TexImage2D on page 116 to: 242 243 "<target> must be one of TEXTURE_2D for a 2D texture, or one 244 of TEXTURE_RECTANGLE_NV for a rectangle texture, or one of 245 TEXTURE_CUBE_MAP_POSITIVE_X_ARB, TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, 246 TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, 247 TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, or TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 248 for a cube map texture. Additionally, <target> can be either 249 PROXY_TEXTURE_2D for a 2D proxy texture or PROXY_TEXTURE_RECTANGLE_NV 250 for a rectangle proxy texture or PROXY_TEXTURE_CUBE_MAP_ARB for a 251 cube map proxy texture as discussed in section 3.8.7. 252 The other parameters match the corresponding parameters of TexImage3D." 253 254 Add a following paragraph reading: 255 256 "Rectangular textures do not support paletted formats. The error 257 INVALID_ENUM is generated if the target is TEXTURE_RECTANGLE_NV 258 or PROXY_TEXTURE_RECTANGLE_NV and the format is COLOR_INDEX or 259 the internalformat is COLOR_INDEX or one of the COLOR_INDEX<n>_EXT 260 internal formats." 261 262 Change the 14th paragraph (page 116) to read: 263 264 "In a similar fashion, the maximum allowable width of a rectangular 265 texture image, and the maximum allowable height of a rectangular 266 texture image, must be at least the implementation-dependent value 267 of MAX_RECTANGLE_TEXTURE_SIZE_NV." 268 269 Add the following paragraph after the paragraph introducing 270 TexImage2D (page 116): 271 272 "When the target is TEXTURE_RECTANGLE_NV, the INVALID_VALUE error is 273 generated if border is any value other than zero or the level is any 274 value other than zero. Also when the target is TEXTURE_RECTANGLE_NV, 275 the texture dimension restrictions specified by equations 3.11, 276 3.12, and 3.13 are ignored; however, if the width is less than zero or 277 the height is less than zero, the error INVALID_VALUE is generated. 278 In the case of a rectangular texture, ws and hs equal the specified 279 width and height respectively of the rectangular texture image 280 while ds is 1." 281 282 Amend the following paragraph that was added by the 283 ARB_texture_cube_map specification after the first paragraph on 284 page 117: 285 286 "A 2D texture consists of a single 2D texture image. A rectangle 287 texture consists of a single 2D texture image. A cube map texture 288 is a set of six 2D texture images. The six cube map texture 289 targets form a single cube map texture though each target names 290 a distinct face of the cube map. The TEXTURE_CUBE_MAP_*_ARB 291 targets listed above update their appropriate cube map face 2D 292 texture image. Note that the six cube map 2D image tokens such as 293 TEXTURE_CUBE_MAP_POSITIVE_X_ARB are used when specifying, updating, 294 or querying one of a cube map's six 2D image, but when enabling cube 295 map texturing or binding to a cube map texture object (that is when 296 the cube map is accessed as a whole as opposed to a particular 2D 297 image), the TEXTURE_CUBE_MAP_ARB target is specified." 298 299 Append to the end of the third to the last paragraph in the section 300 (page 118): 301 302 "A rectangular texture array has depth dt=1, with height ht and width 303 wt defined by the specified image height and width parameters." 304 305 -- Section 3.8.2 "Alternate Texture Image Specification Commands" 306 307 Add TEXTURE_RECTANGLE_NV to the second paragraph (page 120) to say: 308 309 ... "Currently, <target> must be TEXTURE_2D, 310 TEXTURE_RECTANGLE_NV, TEXTURE_CUBE_MAP_POSITIVE_X_ARB, 311 TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, 312 TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, 313 or TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB." ... 314 315 Add TEXTURE_RECTANGLE_NV to the fourth paragraph (page 121) to say: 316 317 ... "Currently the target arguments of TexSubImage1D and 318 CopyTexSubImage1D must be TEXTURE_1D, the <target> arguments of 319 TexSubImage2D and CopyTexSubImage2D must be one of TEXTURE_2D, 320 TEXTURE_RECTANGLE_NV, TEXTURE_CUBE_MAP_POSITIVE_X_ARB, 321 TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, 322 TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, 323 or TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB, and the <target> arguments of 324 TexSubImage3D and CopyTexSubImage3D must be TEXTURE_3D." ... 325 326 Also add to the end of the fourth paragraph (121): 327 328 "If target is TEXTURE_RECTANGLE_NV and level is not zero, the error 329 INVALID_VALUE is generated." 330 331 -- Section "Compressed Texture Images" in the ARB_texture_compression 332 specification 333 334 Add the following paragraph after introducing the 335 CompressedTexImage<n>DARB commands: 336 337 "The error INVALID_ENUM is generated if the target parameter to one 338 of the CompressedTexImage<n>DARB commands is TEXTURE_RECTANGLE_NV." 339 340 Add the following paragraph after introducing the 341 CompressedTexSubImage<n>DARB commands: 342 343 "The error INVALID_ENUM is generated if the target parameter 344 to one of the CompressedTexSubImage<n>DARB commands is 345 TEXTURE_RECTANGLE_NV." 346 347 -- Section 3.8.3 "Texture Parameters" 348 349 Add TEXTURE_RECTANGLE_NV to paragraph one (page 124) to say: 350 351 ... "<target> is the target, either TEXTURE_1D, TEXTURE_2D, 352 TEXTURE_RECTANGLE_NV, TEXTURE_3D, or TEXTURE_CUBE_MAP_ARB." ... 353 354 Add the following paragraph to the end of the section (page 134): 355 356 "Certain texture parameter values may not be specified for textures 357 with a target of TEXTURE_RECTANGLE_NV. The error INVALID_ENUM 358 is generated if the target is TEXTURE_RECTANGLE_NV and the 359 TEXTURE_WRAP_S, TEXTURE_WRAP_T, or TEXTURE_WRAP_R parameter is set to 360 REPEAT or MIRRORED_REPEAT_IBM. The error INVALID_ENUM is generated 361 if the target is TEXTURE_RECTANGLE_NV and the TEXTURE_MIN_FILTER is 362 set to a value other than NEAREST or LINEAR (no mipmap filtering 363 is permitted). The error INVALID_ENUM is generated if the target 364 is TEXTURE_RECTANGLE_NV and TEXTURE_BASE_LEVEL is set to any value 365 other than zero." 366 367 -- Section 3.8.4 "Texture Wrap Modes" 368 369 Add this final additional paragraph: 370 371 "Texture coordinates are clamped differently for rectangular 372 textures. The r texture coordinate is wrapped as described above (as 373 required for shadow mapping to operate correctly). When the texture 374 target is TEXTURE_RECTANGLE_NV, the s and t coordinates are wrapped 375 as follows: CLAMP causes the s coordinate to be clamped to the range 376 [0,ws]. CLAMP causes the t coordinate to be clamped to the range 377 [0,hs]. CLAMP_TO_EDGE causes the s coordinate to be clamped to 378 the range [0.5,ws-0.5]. CLAMP_TO_EDGE causes the t coordinate 379 to be clamped to the range [0.5,hs-0.5]. CLAMP_TO_BORDER_ARB 380 causes the s coordinate to be clamped to the range [-0.5,ws+0.5]. 381 CLAMP_TO_BORDER_ARB causes the t coordinate to be clamped to the 382 range [-0.5,hs+0.5]." 383 384 -- Section 3.8.5 "Texture Minification" under "Mipmapping" 385 386 Change the second full paragraph on page 126 to read: 387 388 "For non-rectangular textures, let u(x,y) = 2^n*s(x,y), v(x,y) = 389 2^m*t(x,y), and w(x,y) = 2^l*r(x,y), where n, m, and l are defined 390 by equations 3.11, 3.12, and 3.13 with ws, hs, and ds equal to 391 the width, height, and depth of the image array whose level is 392 TEXTURE_BASE_LEVEL. However, for rectangular textures let u(x,y) 393 = s(x,y), v(x,y) = t(x,y), and w(x,y) = r(x,y)." 394 395 Update the last sentence in the first full paragraph on page 127 396 to read: 397 398 "Depending on whether the texture's target is rectangular or 399 non-rectangular, this means the texel at location (i,j,k) becomes 400 the texture value, with i given by 401 402 / floor(u), s < 1 403 / 404 i = { 2^n-1, s == 1, non-rectangular texture (3.17) 405 \ 406 \ ws-1, s == 1, rectangular texture 407 408 (Recall that if TEXTURE_WRAP_S is REPEAT, then 0 <= s < 1.) Similarly, 409 j is found as 410 411 / floor(v), t < 1 412 / 413 j = { 2^m-1, t == 1, non-rectangular texture (3.18) 414 \ 415 \ hs-1, t == 1, rectangular texture 416 417 and k is found as 418 419 / floor(w), r < 1 420 / 421 k = { 2^l-1, r == 1, non-rectangular texture (3.19) 422 \ 423 \ 0, r == 1, rectangular texture" 424 425 Change the last sentence in the partial paragraph after equation 426 3.19 to read: 427 428 "For a two-dimensional or rectangular texture, k is irrelevant; 429 the texel at location (i,j) becomes the texture value." 430 431 Change the sentence preceding equation 3.20 (page 128) specifying 432 how to compute the value tau for a two-dimensional texture to: 433 434 "For a two-dimensional or rectangular texture," 435 436 Follow the first full paragraph on page 130 with: 437 438 "Rectangular textures do not support mipmapping (it is an error to 439 specify a minification filter that requires mipmapping)." 440 441 -- Section 3.8.7 "Texture State and Proxy State" 442 443 Change the first sentence of the first paragraph (page 131) to say: 444 445 "The state necessary for texture can be divided into two categories. 446 First, there are the ten sets of mipmap arrays (one each for the 447 one-, two-, and three-dimensional texture targets, one for the 448 rectangular texture target (though the rectangular texture target 449 has only one mipmap level), and six for the cube map texture targets) 450 and their number." ... 451 452 Change the fourth and third to last sentences of the first paragraph 453 to say: 454 455 "In the initial state, the value assigned to TEXTURE_MIN_FILTER 456 is NEAREST_MIPMAP_LINEAR, except for rectangular textures where 457 the initial value is LINEAR, and the value for TEXTURE_MAG_FILTER 458 is LINEAR. s, t, and r warp modes are all set to REPEAT, except 459 for rectangular textures where the initial value is CLAMP_TO_EDGE." 460 461 Change the second paragraph (page 132) to say: 462 463 "In addition to the one-, two-, three-dimensional, rectangular, and 464 the six cube map sets of image arrays, the partially instantiated 465 one-, two-, and three-dimensional, rectangular, and one cube map 466 sets of proxy image arrays are maintained." ... 467 468 Change the third paragraph (page 132) to: 469 470 "One- and two-dimensional and rectangular proxy arrays are operated 471 on in the same way when TexImage1D is executed with target specified 472 as PROXY_TEXTURE_1D, or TexImage2D is executed with target specified 473 as PROXY_TEXTURE_2D or PROXY_TEXTURE_RECTANGLE_NV." 474 475 Change the second sentence of the fourth paragraph (page 132) to: 476 477 "Therefore PROXY_TEXTURE_1D, PROXY_TEXTURE_2D, 478 PROXY_TEXTURE_RECTANGLE_NV, PROXY_TEXTURE_3D, and 479 PROXY_TEXTURE_CUBE_MAP_ARB cannot be used as textures, and their 480 images must never be queried using GetTexImage." ... 481 482 -- Section 3.8.8 "Texture Objects" 483 484 Change the first sentence of the first paragraph (page 132) to say: 485 486 "In addition to the default textures TEXTURE_1D, TEXTURE_2D, 487 TEXTURE_RECTANGLE_NV, TEXTURE_3D, and TEXTURE_CUBE_MAP_ARB, named 488 one-dimensional, two-dimensional, rectangular, and three-dimensional 489 texture objects and cube map texture objects can be created and 490 operated on." ... 491 492 Change the second paragraph (page 132) to say: 493 494 "A texture object is created by binding an unused name to 495 TEXTURE_1D, TEXTURE_2D, TEXTURE_RECTANGLE_NV, TEXTURE_3D, or 496 TEXTURE_CUBE_MAP_ARB." ... "If the new texture object is bound 497 to TEXTURE_1D, TEXTURE_2D, TEXTURE_RECTANGLE_NV, TEXTURE_3D, or 498 TEXTURE_CUBE_MAP_ARB, it remains a one-dimensional, two-dimensional, 499 rectangular, three-dimensional, or cube map texture until it is 500 deleted." 501 502 Change the third paragraph (page 133) to say: 503 504 "BindTexture may also be used to bind an existing texture object 505 to either TEXTURE_1D, TEXTURE_2D, TEXTURE_RECTANGLE_NV, TEXTURE_3D, 506 or TEXTURE_CUBE_MAP_ARB." 507 508 Change paragraph five (page 133) to say: 509 510 "In the initial state, TEXTURE_1D, TEXTURE_2D, TEXTURE_RECTANGLE_NV, 511 TEXTURE_3D, and TEXTURE_CUBE_MAP have one-dimensional, 512 two-dimensional, rectangular, three-dimensional, and cube map state 513 vectors associated with them respectively." ... "The initial, 514 one-dimensional, two-dimensional, rectangular, three-dimensional, and 515 cube map texture is therefore operated upon, queried, and applied 516 as TEXTURE_1D, TEXTURE_2D, TEXTURE_RECTANGLE_NV, TEXTURE_3D, 517 and TEXTURE_CUBE_MAP_ARB respectively while 0 is bound to the 518 corresponding targets." 519 520 Change paragraph six (page 133) to say: 521 522 ... "If a texture that is currently bound to one of the targets 523 TEXTURE_1D, TEXTURE_2D, TEXTURE_RECTANGLE_NV, TEXTURE_3D, or 524 TEXTURE_CUBE_MAP_ARB is deleted, it is as though BindTexture has 525 been executed with the same <target> and <texture> zero." ... 526 527 -- Section 3.8.10 "Texture Application" 528 529 Replace the beginning sentences of the first paragraph (page 138) 530 with: 531 532 "Texturing is enabled or disabled using the generic Enable and 533 Disable commands, respectively, with the symbolic constants 534 TEXTURE_1D, TEXTURE_2D, TEXTURE_RECTANGLE_NV, TEXTURE_3D, 535 or TEXTURE_CUBE_MAP_ARB to enable the one-dimensional, 536 two-dimensional, rectangular, three-dimensional, or cube map 537 texturing respectively. If both two- and one-dimensional textures 538 are enabled, the two-dimensional texture is used. If the rectangular 539 and either of the two- or one-dimensional textures is enabled, the 540 rectangular texture is used. If the three-dimensional and any of the 541 rectangular, two-dimensional, or one-dimensional textures is enabled, 542 the three-dimensional texture is used. If the cube map texture 543 and any of the three-dimensional, rectangular, two-dimensional, 544 or one-dimensional textures is enabled, then cube map texturing is 545 used. 546 547Additions to Chapter 4 of the GL Specification (Per-Fragment Operations 548and the Framebuffer) 549 550 None 551 552Additions to Chapter 5 of the GL Specification (Special Functions) 553 554 -- Section 5.4 "Display Lists" 555 556 In the first paragraph (page 179), add PROXY_TEXTURE_RECTANGLE_NV 557 to the list of PROXY_* tokens. 558 559Additions to Chapter 6 of the GL Specification (State and State Requests) 560 561 -- Section 6.1.3 "Enumerated Queries" 562 563 Change the fourth paragraph (page 183) to say: 564 565 "The GetTexParameter parameter <target> may be one of 566 TEXTURE_1D, TEXTURE_2D, TEXTURE_RECTANGLE_NV, TEXTURE_3D, or 567 TEXTURE_CUBE_MAP_ARB, indicating the currently bound one-dimensional, 568 two-dimensional, rectangular, three-dimensional, or cube map 569 texture object. For GetTexLevelParameter, <target> may be one 570 of TEXTURE_1D, TEXTURE_2D, TEXTURE_RECTANGLE_NV, TEXTURE_3D, 571 TEXTURE_CUBE_MAP_POSITIVE_X_ARB, TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, 572 TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, 573 TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB, 574 PROXY_TEXTURE_1D, PROXY_TEXTURE_2D, PROXY_TEXTURE_RECTANGLE_NV, 575 PROXY_TEXTURE_3D, or PROXY_TEXTURE_CUBE_MAP_ARB, indicating the 576 one-dimensional texture object, two-dimensional texture object, 577 rectangular texture object, three-dimensional texture object, or one 578 of the six distinct 2D images making up the cube map texture object 579 or one-dimensional, two-dimensional, rectangular, three-dimensional, 580 or cube map proxy state vector. Note that TEXTURE_CUBE_MAP_ARB is 581 not a valid <target> parameter for GetTexLevelParameter because it 582 does not specify a particular cube map face." 583 584 -- Section 6.1.4 "Texture Queries" 585 586 Change the first paragraph (page 184) to read: 587 588 ... "It is somewhat different from the other get commands; <tex> is a 589 symbolic value indicating which texture (or texture face in the case 590 of a cube map texture target name) is to be obtained. TEXTURE_1D 591 indicates a one-dimensional texture, TEXTURE_2D indicates a 592 two-dimensional texture, TEXTURE_RECTANGLE_NV indicates a rectangular 593 texture, TEXTURE_3D indicates a three-dimensional texture, and 594 TEXTURE_CUBE_MAP_POSITIVE_X_ARB, TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, 595 TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, 596 TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, and TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 597 indicate the respective face of a cube map texture." 598 599 Add a final sentence to the fourth paragraph: 600 601 "Calling GetTexImage with a lod not zero when the tex is 602 TEXTURE_RECTANGLE_NV causes the error INVALID_VALUE." 603 604Additions to the GLX Specification 605 606 None 607 608GLX Protocol 609 610 None 611 612Dependencies on ARB_texture_border_clamp 613 614 If ARB_texture_border_clamp is not supported, references to the 615 CLAMP_TO_BORDER_ARB wrap mode in this document should be ignored. 616 617Dependencies on IBM_mirrored_repeat 618 619 If IBM_mirrored_repeat is not supported, references to the 620 MIRRORED_REPEAT_IBM wrap mode in this document should be ignored. 621 622Dependencies on EXT_paletted_texture 623 624 If EXT_paletted_texture is not supported, references to the 625 COLOR_INDEX, COLOR_INDEX<n>_EXT, ColorTable, and ColorTableEXT should 626 be ignored. 627 628Dependencies on EXT_texture_compression_s3tc 629 630 If EXT_texture_compression_s3tc is not supported, references 631 to CompressedTexImage2DARB and CompressedTexSubImageARB and the 632 COMPRESSED_*_S3TC_DXT*_EXT enumerants should be ignored. 633 634Errors 635 636 INVALID_ENUM is generated when ColorTable (or ColorTableEXT or the 637 various ColorTable and ColorTableEXT alternative commands) is called 638 and the target is TEXTURE_RECTANGLE_NV or PROXY_TEXTURE_RECTANGLE_NV. 639 640 INVALID_ENUM is generated when TexImage2D is called and the target 641 is TEXTURE_RECTANGLE_NV or PROXY_TEXTURE_RECTANGLE_NV and the format 642 is COLOR_INDEX or the internalformat is COLOR_INDEX or one of the 643 COLOR_INDEX<n>_EXT internal formats. 644 645 INVALID_VALUE is generated when TexImage2D is called when the target 646 is TEXTURE_RECTANGLE_NV if border is any value other than zero or 647 the level is any value other than zero. 648 649 INVALID_VALUE is generated when TexImage2D is called when the target 650 is TEXTURE_RECTANGLE_NV if the width is less than zero or the height 651 is less than zero. 652 653 INVALID_VALUE is generated when TexSubImage2D or CopyTexSubImage2D 654 is called when the target is TEXTURE_RECTANGLE_NV if the level is 655 any value other than zero. 656 657 INVALID_ENUM is generated when one of the CompressedTexImage<n>DARB 658 commands is called when the target parameter is TEXTURE_RECTANGLE_NV. 659 660 INVALID_ENUM is generated when one of the CompressedTexSubImage<n>DARB 661 commands is called when the target parameter is TEXTURE_RECTANGLE_NV. 662 663 INVALID_ENUM is generated when TexParameter is called with a 664 target of TEXTURE_RECTANGLE_NV and the TEXTURE_WRAP_S, TEXTURE_WRAP_T, 665 or TEXTURE_WRAP_R parameter is set to REPEAT or MIRRORED_REPEAT_IBM. 666 667 INVALID_ENUM is generated when TexParameter is called with a 668 target of TEXTURE_RECTANGLE_NV and the TEXTURE_MIN_FILTER is set to 669 a value other than NEAREST or LINEAR. 670 671 INVALID_VALUE is generated when TexParameter is called with a 672 target of TEXTURE_RECTANGLE_NV and the TEXTURE_BASE_LEVEL is set to 673 any value other than zero. 674 675 INVALID_VALUE is generated when GetTexImage is called with a lod 676 not zero when the tex is TEXTURE_RECTANGLE_NV. 677 678New State 679 680(table 6.12, p202) amend/add the following entries: 681 682Get Value Type Get Command Initial Value Description Sec Attribute 683---------------------------- ---- ----------- ------------- --------------------- ------ -------------- 684TEXTURE_RECTANGULAR_NV B IsEnabled False True if rectangular 3.8.10 texture/enable 685 texturing is enabled 686TEXTURE_BINDING_RECTANGLE_NV Z+ GetIntegerv 0 Texture object 3.8.8 texture 687 for texture rectangle 688TEXTURE_RECTANGLE_NV I GetTexImage see 3.8 rectangular texture 3.8 - 689 image for lod 0 690 691 692(table 6.13, p203) amend/add the following entries: 693 694Get Value Type Get Command Initial Value Description Sec Attribute 695------------------ ----- --------------- --------------------- -------------------- ----- --------- 696TEXTURE_MIN_FILTER 2+xZ6 GetTexparameter NEAREST_MIPMAP_LINEAR Texture minification 3.8.5 texture 697 except for function 698 rectangular which is 699 LINEAR 700TEXTURE_WRAP_S 5+xZ5 GetTexParameter REPEAT except Texture wrap mode S 3.8 texture 701 for rectangular 702 which is 703 CLAMP_TO_EDGE 704TEXTURE_WRAP_T 5+xZ5 GetTexParameter REPEAT except Texture wrap mode T 3.8 texture 705 for rectangular 706 which is 707 CLAMP_TO_EDGE 708TEXTURE_WRAP_R 5+xZ5 GetTexParameter REPEAT except Texture wrap mode R 3.8 texture 709 for rectangular 710 which is 711 CLAMP_TO_EDGE 712 713New Implementation Dependent State 714 715(table 6.24, p214) add the following entry: 716 717Get Value Type Get Command Minimum Value Description Sec Attribute 718----------------------------- ---- ----------- ------------- ------------------- ----- --------- 719MAX_RECTANGLE_TEXTURE_SIZE_NV Z+ GetIntegerv 64 Maximum rectangular 3.8.1 - 720 texture image 721 dimension 722 723Revision History 724 725 Jan 2, 2003 - Fix typo in 4th paragraph of Overview to read: "NPOTD 726 textures are accessed by non-normalized texture coordinates." 727 728 March 5, 2004 - Delete update to the convolution section because 729 it was bogus language in the OpenGL 1.2.1 specification saying 730 convolution affects glGetTexImage (it does not); this language was 731 deleted in OpenGL 1.3. Fix minor typo in 6.12 table. 732