back  Return to list

GL_ARB_texture_rectangle
homeprevnext Name
  
     ARB_texture_rectangle  
  
homeprevnext Name Strings
  
     GL_ARB_texture_rectangle  
  
homeprevnext Contributors
  
     Daniel Ginsburg  
     Mark J. Kilgard  
     Brian Paul  
     Geoff Stahl  
     Jeremy Sandmel  
       
homeprevnext Contact
  
     Mark J. Kilgard, NVIDIA Corporation (mjk 'at' nvidia.com)  
     Geoff Stahl, Apple Computer (gstahl 'at' apple.com)  
  
homeprevnext Notice
  
     Copyright to be assigned to the ARB.  
  
homeprevnext Status
  
     Complete. Approved by the ARB on June 8, 2004.  
  
     Functionally identical to EXT_texture_rectangle and  
     NV_texture_rectangle extensions shipping (implemented in Mac OS X  
     version 10.1, NVIDIA's Release 10 drivers, ATI drivers, and Mesa).  
  
homeprevnext Version
  
     Date: February 25, 2005  
     Revision: 1.0  
  
homeprevnext Number
  
     ARB Extension #38  
  
homeprevnext Dependencies
  
     OpenGL 1.1 is required  
  
     OpenGL 1.4 (or ARB_texture_mirrored_repeat) affects the definition  
     of this extension.  
  
     ARB_texture_non_power_of_two trivially affects the definition of  
     this extension.  
  
     ATI_texture_mirror_once affects the definition of this extension.  
  
     EXT_paletted_texture affects the definition of this extension.  
  
     EXT_texture_compression_s3tc affects the definition of this  
     extension.  
  
     EXT_texture_mirror_clamp affects the definition of this extension.  
  
     The OpenGL Shading Language specification (provided by OpenGL 2.0  
     and/or ARB_shader_objects) interacts with this extension.  
  
     This extension is written against the OpenGL 1.5 specification.  
       
homeprevnext Overview
  
     OpenGL texturing is limited to images with power-of-two dimensions  
     and an optional 1-texel border.  The ARB_texture_rectangle extension  
     adds a new texture target that supports 2D textures without requiring  
     power-of-two dimensions.  
  
     Non-power-of-two sized (NPOTS) textures are useful for storing video  
     images that do not have power-of-two sized (POTS).  Re-sampling  
     artifacts are avoided and less texture memory may be required by  
     using non-power-of-two sized textures.  Non-power-of-two sized  
     textures are also useful for shadow maps and window-space texturing.  
  
     However, non-power-of-two sized textures have limitations that  
     do not apply to power-of-two sized textures.  NPOTS textures may  
     not use mipmap filtering; POTS textures support both mipmapped  
     and non-mipmapped filtering.  NPOTS textures support only the  
     GL_CLAMP, GL_CLAMP_TO_EDGE, and GL_CLAMP_TO_BORDER wrap modes;  
     POTS textures support GL_CLAMP_TO_EDGE, GL_REPEAT, GL_CLAMP,  
     GL_MIRRORED_REPEAT, and GL_CLAMP_TO_BORDER (and GL_MIRROR_CLAMP_ATI  
     and GL_MIRROR_CLAMP_TO_EDGE_ATI if ATI_texture_mirror_once is  
     supported) .  NPOTS textures do not support an optional 1-texel  
     border; POTS textures do support an optional 1-texel border.  
  
     NPOTS textures are accessed by dimension-dependent (aka  
     non-normalized) texture coordinates.  So instead of thinking of  
     the texture image lying in a [0..1]x[0..1] range, the NPOTS texture  
     image lies in a [0..w]x[0..h] range.  
  
     This extension adds a new texture target and related state (proxy,  
     binding, max texture size).  
  
homeprevnext Issues
  
  1) Should rectangular textures simply be an extension to the 2D texture  
     target that allows non-power-of-two widths and heights?  
  
     No.  The rectangular texture is an entirely new texture target type  
     called GL_TEXTURE_RECTANGLE_ARB.  This is because while the texture  
     rectangle target relaxes the power-of-two dimensions requirements of  
     the texture 2D target, it also has limitations such as the absence of  
     both mipmapping and the GL_REPEAT and GL_MIRRORED_REPEAT wrap modes.  
     Additionally, rectangular textures do not use [0..1] normalized  
     texture coordinates.  
  
     The texture rectangle is an analogue to the pixel rectangle primitive  
     (see section 3.6 titled "Pixel Rectangles" in the core specification)  
     and the framebuffer.  Just as the pixel rectangle primitive and  
     the framebuffer are accessed by integer-ized dimension-dependent 2D  
     coordinates, so is the texture rectangle.  Just as pixel rectangles  
     and the framebuffer do not have mipmaps, nor do texture rectangles.  
  
  2) Should 1D, 2D, 3D, or cube map textures be allowed to be NPOTS by  
     this extension?  
      
     No.  The ARB_texture_non_power_of_two extension relaxes the  
     power-of-two restrictions for these conventional texture targets to  
     support NPOTS while maintaining the normalized texture coordinates.  
  
  3) How is the image of a rectangular texture specified?  
  
     Using the standard OpenGL API for specifying a 2D texture  
     image: glTexImage2D, glSubTexImage2D, glCopyTexImage2D,  
     and glCopySubTexImage2D.  The target for these commands is  
     GL_TEXTURE_RECTANGLE_ARB though.  
  
     This is similar to how the texture cube map functionality uses the 2D  
     texture image specification API though with its own texture target.  
  
     The texture target GL_TEXTURE_RECTANGLE_ARB should also  
     be used for glGetTexImage, glGetTexLevelParameteriv, and  
     glGetTexLevelParameterfv.  
  
  4) Should anything be said about performance?  
  
     No, but developers should not be surprised if conventional POTS  
     textures will render slightly faster than texture rectangle textures.  
     This is particularly likely to be true when texture rectangle  
     textures are minified leading to texture cache thrashing due to  
     lack of support for mipmaps.  
  
  5) Is mipmap filtering permitted?  
  
     Mipmap filtering is not permitted.  Since this is the case the  
     default minification filter for GL_TEXTURE_RECTANGLE_ARB targets is  
     GL_LINEAR.  
  
  6) What texture wrap modes are allowed and what is the default  
     state?  
  
     Only the GL_CLAMP, GL_CLAMP_TO_EDGE, and CLAMP_TO_BORDER  
     wrap modes are allowed.  CLAMP_TO_EDGE is the default state.  
     GL_REPEAT and GL_MIRRORED_REPEAT are not supported with the  
     GL_TEXTURE_RECTANGLE_ARB texture target.  
  
  7) Are texture borders supported?  
  
     Borders are not supported.  
  
  8) Are paletted textures supported?  
  
     Paletted rectangular textures are not supported.  
  
  9) Can compressed texture images be specified for a rectangular texture?  
  
     The generic texture compression internal formats introduced by  
     ARB_texture_compression are supported for rectangular textures  
     because the image is not presented as compressed data and the  
     ARB_texture_compression extension always permits generic texture  
     compression internal formats to be stored in uncompressed form.  
     Implementations are free to support generic compression internal  
     formats for rectangular textures if supported but such support is  
     not required.  
  
     This extensions makes a blanket statement that specific compressed  
     internal formats for use with glCompressedTexImage<n>D are NOT  
     supported for rectangular textures.  This is because several existing  
     hardware implementations of texture compression formats such as S3TC  
     are not designed for compressing rectangular textures.  This does  
     not preclude future texture compression extensions from supporting  
     compressed internal formats that do work with rectangular extensions  
     (by relaxing the current blanket error condition).  
  
 10) How are rectangular textures enabled?  
  
     Rectangular textures are enabled by enabling the  
     GL_TEXTURE_RECTANGLE_ARB texture target via glEnable  
     (GL_TEXTURE_RECTANGLE_ARB). This enable is prioritized above  
     GL_TEXTURE_2D and below GL_TEXTURE_3D.  
  
     From lowest priority to highest priority: GL_TEXTURE_1D,  
     GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_3D,  
     GL_TEXTURE_CUBE_MAP.  
  
 11) How are texture coordinates addressed for rectangular textures?  
  
     Texture coordinates are addressed without being normalized from  
     [0..1], instead [0..w] and [0..h] are used, where w and h are width  
     and height of the texture respectively.  
  
 12) How should applications determine the available maximum texture  
     dimensions available?  
  
     Implementation dependent rectangular texture size limitations are  
     queried using the GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB parameter and  
     may be different that standard texture size limits.  
  
 13) How does the handling of the R texture component differ from  
     the handling of S and T?  
  
     The R texture coordinate for rectangular textures is handled  
     as it would be for standard two dimensional textures.  Thus the  
     coordinates range from [0..1] and the wrapping mode is unchanged  
     from the default.  
  
 14) Does this extension work with OpenGL 1.4's shadow mapping?  
  
     Yes.  The one non-obvious allowance to support OpenGL 1.4's shadow  
     mapping is that the R texture coordinate wrap mode remains UNCHANGED  
     for rectangular textures.  Clamping of the R texture coordinate  
     for rectangular textures uses the standard [0,1] interval rather  
     than the [0,w_s] or [0,h_s] intervals as in the case of S and T.  
     This is because R represents a depth value in the [0,1] range  
     whether using a 2D or rectangular texture.  
  
homeprevnext New Procedures and Functions
  
    None  
  
homeprevnext New Tokens
  
     Accepted by the <cap> parameter of Enable, Disable and  
     IsEnabled; by the <pname> parameter of GetBooleanv, GetIntegerv,  
     GetFloatv and GetDoublev; and by the <target> parameter of  
     BindTexture, GetTexParameterfv, GetTexParameteriv,  
     TexParameterf, TexParameteri, TexParameterfv and TexParameteriv:  
  
     TEXTURE_RECTANGLE_ARB            0x84F5  
       
     Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,  
     GetFloatv and GetDoublev:  
  
     TEXTURE_BINDING_RECTANGLE_ARB    0x84F6  
       
     Accepted by the <target> parameter of GetTexLevelParameteriv,  
     GetTexLevelParameterfv, GetTexParameteriv and TexImage2D:  
  
     PROXY_TEXTURE_RECTANGLE_ARB      0x84F7  
       
     Accepted by the <pname> parameter of GetBooleanv, GetDoublev,  
     GetIntegerv and GetFloatv:  
  
     MAX_RECTANGLE_TEXTURE_SIZE_ARB   0x84F8  
  
     Accepted by the <target> parameter of GetTexImage,  
     GetTexLevelParameteriv, GetTexLevelParameterfv, TexImage2D,  
     CopyTexImage2D, TexSubImage2D and CopySubTexImage2D:  
  
     TEXTURE_RECTANGLE_ARB  
  
homeprevnext Additions to Chapter 2 of the OpenGL 1.3 Specification (OpenGL Operation)
  
     None  
  
homeprevnext Additions to Chapter 3 of the OpenGL 1.3 Specification (Rasterization)
  
    These changes describe use of the TEXTURE_RECTANGLE_ARB texture  
    target, supported formats, texture dimensions, and texture proxies:  
  
  - (3.6.3, pg.93)  "Pixel Transfer Modes" under "Color Table  
    Specification" or the ColorTableEXT description in the  
    EXT_paletted_texture specification  
  
    If EXT_paletted_texture is supported, add the following statement  
    after paragraph 5 of the sub-section:  
  
    "The error INVALID_ENUM is generated if the target to ColorTable (or  
    ColorTableEXT or the various ColorTable and ColorTableEXT alternative  
    commands) is TEXTURE_RECTANGLE_ARB or PROXY_TEXTURE_RECTANGLE_ARB."  
  
  - (3.8.1, pg. 131) "Texture Image Specification"  
  
    Add a sentence to the middle of the 19th paragraph of the  
    section (sixth paragraph on the page), directly after "... for  
    image arrays of level 0 through k, where k is the log base 2 of  
    MAX_TEXTURE_SIZE." reading:  
  
    "The maximum allowable width of a rectangular texture image,  
    and the maximum allowable height of a rectangular texture  
    image, must be at least the implementation-dependent value of  
    MAX_RECTANGLE_TEXTURE_SIZE_ARB."  
  
  - (3.8.1, pg. 132) "Texture Image Specification"  
  
    In the 21th paragraph of this section (sixth paragraph on the page),  
    change the sentence following "The command void TexImage2D ... a  
    two-dimensional texture image." through the rest of the paragraph  
    in the section describing two-dimensional texturing to read:  
  
    "<target> must be one of TEXTURE_2D for a two-dimensional texture,  
    or one of TEXTURE_RECTANGLE_ARB for a rectangle texture, or one  
    of TEXTURE_CUBE_MAP_POSITIVE_X, TEXTURE_CUBE_MAP_NEGATIVE_X,  
    TEXTURE_CUBE_MAP_POSITIVE_Y, TEXTURE_CUBE_MAP_NEGATIVE_Y,  
    TEXTURE_CUBE_MAP_POSITIVE_Z, or TEXTURE_CUBE_MAP_NEGATIVE_Z for a cube  
    map texture. Additionally, <target> may be either PROXY_TEXTURE_2D  
    for a two-dimensional proxy texture, PROXY_TEXTURE_RECTANGLE_ARB for  
    a rectangle proxy texture or PROXY_TEXTURE_CUBE_MAP for a cube map  
    proxy texture as discussed in section 3.8.10. The other parameters  
    match the corresponding parameters of TexImage3D."  
  
    Add this paragraph following the above two-dimensional texturing  
    introduction, reading:  
  
    When the target is TEXTURE_RECTANGLE_ARB, the INVALID_VALUE error is  
    generated if border is any value other than zero or the level is any  
    value other than zero. Also when the target is TEXTURE_RECTANGLE_ARB,  
    the texture dimension restrictions specified by equations 3.11, 3.12,  
    and 3.13 are ignored; however, if the width is less than zero or the  
    height is less than zero, the error INVALID_VALUE is generated. In the  
    case of a rectangular texture, w_s and h_s equal the specified width and  
    height respectively of the rectangular texture image while d_s is 1."  
  
    If EXT_paletted_texture is supported, add this paragraph too:  
      
    "Rectangular textures do not support paletted formats. The error  
    INVALID_ENUM is generated if the target is TEXTURE_RECTANGLE_ARB or  
    PROXY_TEXTURE_RECTANGLE_ARB and the format is COLOR_INDEX or the  
    internal format is COLOR_INDEX or one of the COLOR_INDEX<n>_EXT  
    internal formats."  
  
  - (3.8.1, pg. 132) "Texture Image Specification"  
      
    Amend the third paragraph on the page to read:  
      
    "A two-dimensional texture consists of a single two-dimensional  
    texture image. A rectangle texture consists of a single 2D texture  
    image. A cube map texture is a set of six two-dimensional texture  
    images. The six cube map texture targets form a single cube map  
    texture though each target names a distinct face of the cube  
    map. The TEXTURE_CUBE_MAP_* targets listed above update their  
    appropriate cube map face 2D texture image.  The six cube map  
    two-dimensional image tokens such as TEXTURE_CUBE_MAP_POSITIVE_X  
    are used when specifying, updating, or querying one of a cube map's  
    six two-dimensional images, but when enabling cube map texturing  
    or binding to a cube map texture object (that is when the cube map  
    is accessed as a whole as opposed to a particular two-dimensional  
    image), the TEXTURE_CUBE_MAP target is specified."  
      
  - (3.8.1, pg. 133) "Texture Image Specification"  
      
    Append to the end of the third to the last paragraph in the section:  
      
    "A rectangular texture array has depth dt=1, with height ht and  
    width wt defined by the specified image height and width  
    parameters."  
      
  - (3.8.2, pg. 135) "Alternate Texture Image Specification Commands"  
      
    Add TEXTURE_RECTANGLE_ARB to the target list of the second paragraph  
    of the section to say:  
      
    ... "Currently, <target> must be TEXTURE_2D, TEXTURE_RECTANGLE_ARB,  
    TEXTURE_CUBE_MAP_POSITIVE_X, TEXTURE_CUBE_MAP_NEGATIVE_X,  
    TEXTURE_CUBE_MAP_POSITIVE_Y, TEXTURE_CUBE_MAP_NEGATIVE_Y,  
    TEXTURE_CUBE_MAP_POSITIVE_Z, or TEXTURE_CUBE_MAP_NEGATIVE_Z." ...  
      
  - (3.8.2, pg. 136) "Alternate Texture Image Specification Commands"  
      
    Add TEXTURE_RECTANGLE_ARB to the target list in the fifth paragraph  
    of the section to say:  
      
    ... "Currently the target arguments of TexSubImage1D and  
    CopyTexSubImage1D must be TEXTURE_1D, the <target> arguments of  
    TexSubImage2D and CopyTexSubImage2D must be one of TEXTURE_2D,  
    TEXTURE_RECTANGLE_ARB, TEXTURE_CUBE_MAP_POSITIVE_X,  
    TEXTURE_CUBE_MAP_NEGATIVE_X, TEXTURE_CUBE_MAP_POSITIVE_Y,  
    TEXTURE_CUBE_MAP_NEGATIVE_Y, TEXTURE_CUBE_MAP_POSITIVE_Z, or  
    TEXTURE_CUBE_MAP_NEGATIVE_Z, and the <target> arguments of  
    TexSubImage3D and CopyTexSubImage3D must be TEXTURE_3D." ...  
      
    Also append to the end of this paragraph:  
      
    "If target is TEXTURE_RECTANGLE_ARB and level is not zero, the error  
    INVALID_VALUE is generated."  
      
  - (3.8.3, pg. 133) "Compressed Texture Images"  
      
    Add the following paragraph after the second paragraph in the  
    section, which introduces the CompressedTexImage<n>D commands:  
      
    "The error INVALID_ENUM is generated if the target parameter to one  
    of the CompressedTexImage<n>D commands is TEXTURE_RECTANGLE_ARB or  
    PROXY_TEXTURE_RECTANGLE_ARB."  
  
    Add the following paragraph after introducing the  
    CompressedTexSubImage<n>D commands:  
  
    "The error INVALID_ENUM is generated if the target parameter to one  
    of the CompressedTexSubImage<n>D commands is TEXTURE_RECTANGLE_ARB  
    or PROXY_TEXTURE_RECTANGLE_ARB."  
      
  - (3.8.4, pg. 136) "Texture Parameters"  
      
    Add TEXTURE_RECTANGLE_ARB to paragraph one to say:  
  
    ... "<target> is the target, either TEXTURE_1D, TEXTURE_2D,  
    TEXTURE_RECTANGLE_ARB, TEXTURE_3D, or TEXTURE_CUBE_MAP." ...  
      
  - (3.8.4, pg. 143) "Texture Parameters"  
      
    Add the following paragraph to the end of the section:  
      
    "Certain texture parameter values may not be specified for  
    textures with a target of TEXTURE_RECTANGLE_ARB. The error  
    INVALID_ENUM is generated if the target is TEXTURE_RECTANGLE_ARB  
    and the TEXTURE_WRAP_S, TEXTURE_WRAP_T, or TEXTURE_WRAP_R  
    parameter is set to REPEAT, MIRRORED_REPEAT,  
    MIRROR_CLAMP_EXT (MIRROR_CLAMP_ATI), MIRROR_CLAMP_TO_EDGE_EXT  
    (MIRROR_CLAMP_TO_EDGE_ATI) or MIRROR_CLAMP_TO_BORDER_EXT. The error  
    INVALID_ENUM is generated if the target is TEXTURE_RECTANGLE_ARB  
    and the TEXTURE_MIN_FILTER is set to a value other than  
    NEAREST or LINEAR (no mipmap filtering is permitted). The error  
    INVALID_ENUM is generated if the target is TEXTURE_RECTANGLE_ARB  
    and TEXTURE_BASE_LEVEL is set to any value other than zero."  
      
  - (3.8.7, pg. 147) "Texture Wrap Modes"  
      
    Add this final additional paragraph:  
  
    "Texture coordinates are clamped differently for rectangular  
    textures. The r texture coordinate is wrapped as described above.  
    When the texture target is TEXTURE_RECTANGLE_ARB, the s and t  
    coordinates are wrapped as follows: CLAMP causes the s coordinate  
    to be clamped to the range [0, w_s]. CLAMP causes the t coordinate  
    to be clamped to the range [0, h_s]. CLAMP_TO_EDGE causes the s  
    coordinate to be clamped to the range [0.5, w_s-0.5]. CLAMP_TO_EDGE  
    causes the t coordinate to be clamped to the range [0.5, h_s - 0.5].  
    CLAMP_TO_BORDER causes the s coordinate to be clamped to the range  
    [-0.5, w_s + 0.5]. CLAMP_TO_BORDER causes the t coordinate to be  
    clamped to the range [-0.5, h_s + 0.5]."  
      
  - (3.8.8, pg. 148) "Texture Minification"  
      
    Under the "Scale Factor and Level of Detail" sub-section, change the  
    fourth paragraph in the subsection to read:  
      
    "For non-rectangular textures, let u(x,y) = 2^n * s(x, y), v(x, y) =  
    2^m * t(x, y), and w(x, y) = 2^l * r(x, y), where n, m, and l are  
    defined by equations 3.13, 3.14, and 3.15 with w_s, h_s, and d_s  
    equal to the width, height, and depth of the image array whose level  
    is TEXTURE_BASE_LEVEL. However, for rectangular textures let u(x,  
    y) = s(x, y), v(x, y) = t(x, y), and w(x, y) = r(x, y)."  
  
    When ARB_texture_non_power_of_two is supported, this same wording  
    instead should read:  
  
    "For non-rectangular textures, let u(x,y) = w_i * s(x,y), v(x,y) =  
    h_i * t(x,y), and w(x,y) = d_i * r(x,y), where w_i, h_i, and d_i are  
    as defined by equations 3.13, 3.14, and 3.15 with w_s, h_s, and d_s  
    equal to the width, height, and depth of the image array whose level  
    is TEXTURE_BASE_LEVEL." However, for rectangular textures let u(x,  
    y) = s(x, y), v(x, y) = t(x, y), and w(x, y) = r(x, y)."   
      
  - (3.8.8, pg. 149) "Texture Minification"  
      
    Update the last sentence in the first paragraph on the page to read:  
      
    "Depending on whether the texture's target is rectangular or  
    non-rectangular, this means the texel at location (i,j,k) becomes  
    the texture value, with i given by  
  
            / floor (u),    s < 1 and non-rectangular texture  
            |  
    i =     | 2^n - 1,      s == 1 and non-rectangular texture (3.19)  
            |  
            | floor(u)      s < w_s and rectangular texture  
            |  
            \ w_s-1         s >= w_s and rectangular texture  
      
    (Recall that if TEXTURE_WRAP_S is REPEAT, then 0 <= s < 1.)  
    Similarly, j is found as  
  
            / floor(v),     t < 1 and non-rectangular texture  
            |  
    j =     | 2^m - 1,      t == 1 and non-rectangular texture (3.20)  
            |  
            | floor(v)      t < h_s and rectangular texture  
            |  
            \ h_s-1         t >= h_s and rectangular texture  
  
    and k is found as  
      
            / floor (w),    r < 1  
    k =     |                                               (3.21)  
            \ 2^l - 1,      r == 1"  
  
    When ARB_texture_non_power_of_two is supported, replace 2^n, 2^m,  
    and 2^l with w_i, h_i, and d_i in Equations 3.19, 3.20, and 3.21.  
  
  - (3.8.8, pg. 149) "Texture Minification"  
      
    Change the last sentence in the first paragraph on the page,  
    directly after equation 3.19 to read:  
      
    "For a two-dimensional or rectangular texture, k is irrelevant; the  
    texel at location (i,j) becomes the texture value."  
      
  - (3.8.8, pg. 150) "Texture Minification"  
      
    Change the sentence preceding equation 3.22:  
      
    "For a two-dimensional or rectangular texture,"  
      
  - (3.8.8, pg. 151) "Texture Minification"  
      
    Follow the paragraph on the page which ends with "...  must be  
    defined, as discussed in section 3.8.10." with:  
  
    "Rectangular textures do not support mipmapping (it is an error to  
    specify a minification filter that requires mipmapping)."  
      
  - (3.8.11, pg. 154) "Texture State and Proxy State"  
      
    Change the first sentence of the first paragraph to say:  
  
    "The state necessary for texture can be divided into two categories.  
    First, there are the ten sets of mipmap arrays (one each for the  
    one-, two-, and three-dimensional texture targets, one for the  
    rectangular texture target (though the rectangular texture target  
    has only one mipmap level), and six for the cube map texture  
    targets) and their number." ...  
      
  - (3.8.11, pg. 155) "Texture State and Proxy State"  
      
    Change the sixth and fifth to last sentences of the first paragraph  
    to say:  
  
    "In the initial state, the value assigned to TEXTURE_MIN_FILTER is  
    NEAREST_MIPMAP_LINEAR, except for rectangular textures where the  
    initial value is LINEAR, and the value for TEXTURE_MAG_FILTER is  
    LINEAR. s, t, and r warp modes are all set to REPEAT, except for  
    rectangular textures where the initial value is CLAMP_TO_EDGE."  
      
  - (3.8.11, pg. 155) "Texture State and Proxy State"  
      
    Change the second paragraph of the section to say:  
  
    "In addition to the one-, two-, three-dimensional, rectangular, and  
    the six cube map sets of image arrays, the partially instantiated  
    one-, two-, and three-dimensional, rectangular, and one cube map  
    sets of proxy image arrays are maintained." ...  
      
  - (3.8.11, pg. 155) "Texture State and Proxy State"  
      
    Change the third paragraph to:  
      
    "One- and two-dimensional and rectangular proxy arrays are operated  
    on in the same way when TexImage1D is executed with target specified  
    as PROXY_TEXTURE_1D, or TexImage2D is executed with target specified  
    as PROXY_TEXTURE_2D or PROXY_TEXTURE_RECTANGLE_ARB."  
      
  - (3.8.11, pg. 156) "Texture State and Proxy State"  
      
    Change the second sentence of the fifth paragraph of the section to:  
      
    "Therefore PROXY_TEXTURE_1D, PROXY_TEXTURE_2D,  
    PROXY_TEXTURE_RECTANGLE_ARB, PROXY_TEXTURE_3D, and  
    PROXY_TEXTURE_CUBE_MAP cannot be used as textures, and their images  
    must never be queried using GetTexImage." ...  
      
  - (3.8.12, pg. 156) "Texture Objects"  
      
    Change the first sentence of the first paragraph to say:  
  
    "In addition to the default textures TEXTURE_1D, TEXTURE_2D,  
    TEXTURE_RECTANGLE_ARB, TEXTURE_3D, and TEXTURE_CUBE_MAP, named  
    one-dimensional, two-dimensional, rectangular, and three-dimensional  
    texture objects and cube map texture objects can be created and  
    operated on." ...  
      
  - (3.8.12, pg. 156) "Texture Objects"  
      
    Change the second paragraph in the section to say:  
  
    "A texture object is created by binding an unused name to  
    TEXTURE_1D, TEXTURE_2D, TEXTURE_RECTANGLE_ARB, TEXTURE_3D, or  
    TEXTURE_CUBE_MAP." ... "If the new texture object is bound to  
    TEXTURE_1D, TEXTURE_2D, TEXTURE_RECTANGLE_ARB, TEXTURE_3D, or  
    TEXTURE_CUBE_MAP, it remains a one-dimensional, two-dimensional,  
    rectangular, three-dimensional, or cube map texture until it is  
    deleted."  
      
  - (3.8.12, pg. 156) "Texture Objects"  
      
    Change the third paragraph to say:  
      
    "BindTexture may also be used to bind an existing texture object to  
    either TEXTURE_1D, TEXTURE_2D, TEXTURE_RECTANGLE_ARB, TEXTURE_3D, or  
    TEXTURE_CUBE_MAP."  
      
  - (3.8.12, pg. 157) "Texture Objects"  
      
    Change paragraph five of the section to say:  
      
    "In the initial state, TEXTURE_1D, TEXTURE_2D,  
    TEXTURE_RECTANGLE_ARB, TEXTURE_3D, and TEXTURE_CUBE_MAP have  
    one-dimensional, two-dimensional, rectangular, three-dimensional,  
    and cube map state vectors associated with them respectively." ...  
    "The initial, one-dimensional, two-dimensional, rectangular,  
    three-dimensional, and cube map texture is therefore operated upon,  
    queried, and applied as TEXTURE_1D, TEXTURE_2D,  
    TEXTURE_RECTANGLE_ARB, TEXTURE_3D, and TEXTURE_CUBE_MAP respectively  
    while 0 is bound to the corresponding targets."  
      
  - (3.8.12, pg. 157) "Texture Objects"  
      
    Change paragraph six of the section to say:  
      
    ... "If a texture that is currently bound to one of the targets  
    TEXTURE_1D, TEXTURE_2D, TEXTURE_RECTANGLE_ARB, TEXTURE_3D, or  
    TEXTURE_CUBE_MAP is deleted, it is as though BindTexture has been  
    executed with the same <target> and <texture> zero." ...  
      
  - (3.8.15 pg. 164) "Texture Application"  
      
    Replace the beginning sentences of the first paragraph with:  
      
    "Texturing is enabled or disabled using the generic Enable and  
    Disable commands, respectively, with the symbolic constants  
    TEXTURE_1D, TEXTURE_2D, TEXTURE_RECTANGLE_ARB, TEXTURE_3D, or  
    TEXTURE_CUBE_MAP to enable the one-dimensional, two-dimensional,  
    rectangular, three-dimensional, or cube map texturing respectively.  
    If both two- and one-dimensional textures are enabled, the  
    two-dimensional texture is used. If the rectangular and either of  
    the two- or one-dimensional textures is enabled, the rectangular  
    texture is used. If the three-dimensional and any of the  
    rectangular, two-dimensional, or one-dimensional textures is  
    enabled, the three-dimensional texture is used. If the cube map  
    texture and any of the three-dimensional, rectangular,  
    two-dimensional, or one-dimensional textures is enabled, then cube  
    map texturing is used.  
  
homeprevnext Additions to Chapter 4 of the OpenGL 1.3 Specification (Per-Fragment Operations and the Framebuffer)
  
    None  
  
homeprevnext Additions to Chapter 5 of the OpenGL 1.3 Specification (Special Functions)
  
  - (5.4, pg. 210) "Display Lists"  
  
    In the second to last paragraph of the section, add  
    PROXY_TEXTURE_RECTANGLE_ARB to the list of PROXY_* tokens.  
  
homeprevnext Additions to Chapter 6 of the OpenGL 1.3 Specification (State and State Requests)
  
  - (6.1.3, pg. 215) "Enumerated Queries"  
  
    Change the fourth paragraph to say:  
  
    "The GetTexParameter parameter <target> may be one of TEXTURE_1D,  
    TEXTURE_2D, TEXTURE_RECTANGLE_ARB, TEXTURE_3D, or TEXTURE_CUBE_MAP,  
    indicating the currently bound one-dimensional, two-dimensional,  
    rectangular, three-dimensional, or cube map texture object. For  
    GetTexLevelParameter, <target> may be one of TEXTURE_1D, TEXTURE_2D,  
    TEXTURE_RECTANGLE_ARB, TEXTURE_3D, TEXTURE_CUBE_MAP_POSITIVE_X,  
    TEXTURE_CUBE_MAP_NEGATIVE_X, TEXTURE_CUBE_MAP_POSITIVE_Y,  
    TEXTURE_CUBE_MAP_NEGATIVE_Y, TEXTURE_CUBE_MAP_POSITIVE_Z,  
    TEXTURE_CUBE_MAP_NEGATIVE_Z, PROXY_TEXTURE_1D, PROXY_TEXTURE_2D,  
    PROXY_TEXTURE_RECTANGLE_ARB, PROXY_TEXTURE_3D, or  
    PROXY_TEXTURE_CUBE_MAP, indicating the one-dimensional texture  
    object, two-dimensional texture object, rectangular texture object,  
    three-dimensional texture object, or one of the six distinct 2D  
    images making up the cube map texture object or one-dimensional,  
    two-dimensional, rectangular, three-dimensional, or cube map proxy  
    state vector. Note that TEXTURE_CUBE_MAP is not a valid <target>  
    parameter for GetTexLevelParameter because it does not specify a  
    particular cube map face."  
      
  - (6.1.4, pg. 217) "Texture Queries"  
      
    Change the first paragraph to read:  
      
    ... "It is somewhat different from the other get commands; <tex> is  
    a symbolic value indicating which texture (or texture face in the  
    case of a cube map texture target name) is to be obtained.  
    TEXTURE_1D indicates a one-dimensional texture, TEXTURE_2D indicates  
    a two-dimensional texture, TEXTURE_RECTANGLE_ARB indicates a  
    rectangular texture, TEXTURE_3D indicates a three-dimensional  
    texture, and TEXTURE_CUBE_MAP_POSITIVE_X,  
    TEXTURE_CUBE_MAP_NEGATIVE_X, TEXTURE_CUBE_MAP_POSITIVE_Y,  
    TEXTURE_CUBE_MAP_NEGATIVE_Y, TEXTURE_CUBE_MAP_POSITIVE_Z, and  
    TEXTURE_CUBE_MAP_NEGATIVE_Z indicate the respective face of a cube  
    map texture."  
      
  - (6.1.4, pg. 217) "Texture Queries"  
      
    Add a final sentence to the fourth paragraph of the section,  
    immediately after ... "or DEPTH COMPONENT causes the error INVALID  
    ENUM.":  
  
    "Calling GetTexImage with a lod not zero when the tex is  
    TEXTURE_RECTANGLE_ARB causes the error INVALID_VALUE."  
  
homeprevnext Additions to the OpenGL Shading Language specification
  
    The following (previously reserved) keywords are now used:  
  
        sampler2DRect  
        sampler2DRectShadow  
  
    Add to section 8.7 "Texture Lookup Functions"  
  
    Syntax:  
  
        vec4 texture2DRect(sampler2DRect sampler, vec2 coord)  
        vec4 texture2DRectProj(sampler2DRect sampler, vec3 coord)  
        vec4 texture2DRectProj(sampler2DRect sampler, vec4 coord)  
  
    Description:  
  
        "Use the texture coordinate coord to do a texture lookup in the  
        rectangle texture currently bound to sampler.  For the projective  
        ("Proj") version, the texture coordinate (coord.s, coord.t) is  
        divided by the last component of coord.  The third component of  
        coord is ignored for the vec4 coord variant.  
  
        No "bias" parameter or "Lod" suffixed functions for rectangle  
        textures are supported because mipmaps are not allowed for  
        rectangle textures."  
  
    Syntax:  
  
        vec4 shadow2DRect(sampler2DRectShadow sampler, vec3 coord)  
        vec4 shadow2DRectProj(sampler2DRectShadow sampler, vec4 coord)  
  
     Description  
  
        "Use texture coordinate coord to do a depth comparison lookup on  
        the depth texture bound to sampler, as described in section 3.8.14  
        of version 2.0 of the OpenGL specification. The 3rd component  
        of coord (coord.p) is used as the R value. The texture bound to  
        sampler must be a depth texture, or results are undefined. For  
        the projective ("Proj") version of each built-in, the texture  
        coordinate is divided by coord.q, giving a depth value R of  
        coord.p/coord.q.  
  
        No "bias" parameter or "Lod" suffixed functions for rectangle  
        textures are supported because mipmaps are not allowed for  
        rectangle textures."  
  
homeprevnext Additions to the GLX Specification
  
    None  
  
homeprevnext GLX Protocol
  
    None  
  
homeprevnext Dependencies on OpenGL 1.4 and ARB_texture_mirrored_repeat
  
    If OpenGL 1.4 (or ARB_mirrored_repeat) is not supported, references  
    to the MIRRORED_REPEAT (or MIRRORED_REPEAT_ARB) wrap mode in this  
    document should be ignored.  
  
homeprevnext Dependencies on ARB_texture_non_power_of_two
  
    If ARB_texture_non_power_of_two is supported, some specification  
    wording and equations are trivially altered as discussed in the  
    specification.  
  
homeprevnext Dependencies on ATI_texture_mirror_once
  
    If ATI_texture_mirror_once is not supported, references to the  
    MIRROR_CLAMP_ATI and MIRROR_CLAMP_TO_EDGE_ATI wrap modes in this  
    document should be ignored.  
  
homeprevnext Dependencies on EXT_paletted_texture
  
    If EXT_paletted_texture is not supported, references to the  
    COLOR_INDEX, COLOR_INDEX<n>_EXT, ColorTable, and ColorTableEXT  
    should be ignored.  
  
homeprevnext Dependencies on EXT_texture_compression_s3tc
  
    If EXT_texture_compression_s3tc is not supported, references  
    to CompressedTexImage2D and CompressedTexSubImageARB and the  
    COMPRESSED_*_S3TC_DXT*_EXT enumerants should be ignored.  
      
homeprevnext Dependencies on EXT_texture_mirror_clamp
  
    If EXT_texture_mirror_clamp is not supported, references to the  
    MIRROR_CLAMP_EXT, MIRROR_CLAMP_TO_EDGE_EXT, and  
    MIRROR_CLAMP_TO_BORDER_EXT wrap modes in this document should be  
    ignored.  
  
homeprevnext Errors
  
    INVALID_ENUM is generated when ColorTable (or ColorTableEXT or the  
    various ColorTable and ColorTableEXT alternative commands) is called  
    and the target is TEXTURE_RECTANGLE_ARB or  
    PROXY_TEXTURE_RECTANGLE_ARB.  
  
    INVALID_ENUM is generated when TexImage2D is called and the target  
    is TEXTURE_RECTANGLE_ARB or PROXY_TEXTURE_RECTANGLE_ARB and the  
    format is COLOR_INDEX or the internalformat is COLOR_INDEX or one of  
    the COLOR_INDEX<n>_EXT internal formats.  
  
    INVALID_VALUE is generated when TexImage2D is called when the target  
    is TEXTURE_RECTANGLE_ARB if border is any value other than zero or  
    the level is any value other than zero.  
  
    INVALID_VALUE is generated when TexImage2D is called when the target  
    is TEXTURE_RECTANGLE_ARB if the width is less than zero or the  
    height is less than zero.  
  
    INVALID_VALUE is generated when TexSubImage2D or CopyTexSubImage2D  
    is called when the target is TEXTURE_RECTANGLE_ARB if the level is  
    any value other than zero.  
  
    INVALID_ENUM is generated when one of the CompressedTexImage<n>D  
    commands is called when the target parameter is  
    TEXTURE_RECTANGLE_ARB or PROXY_TEXTURE_RECTANGLE_ARB.  
  
    INVALID_ENUM is generated when one of the CompressedTexSubImage<n>D  
    commands is called when the target parameter is TEXTURE_RECTANGLE_ARB  
    or PROXY_TEXTURE_RECTANGLE_ARB.  
  
    INVALID_ENUM is generated when TexParameter is called with a target  
    of TEXTURE_RECTANGLE_ARB and the TEXTURE_WRAP_S, TEXTURE_WRAP_T,  
    or TEXTURE_WRAP_R parameter is set to REPEAT, MIRRORED_REPEAT,  
    MIRROR_CLAMP_ATI, or MIRROR_CLAMP_TO_EDGE_ATI.  
  
    INVALID_ENUM is generated when TexParameter is called with a target  
    of TEXTURE_RECTANGLE_ARB and the TEXTURE_MIN_FILTER is set to a  
    value other than NEAREST or LINEAR.  
  
    INVALID_VALUE is generated when TexParameter is called with a target  
    of TEXTURE_RECTANGLE_ARB and the TEXTURE_BASE_LEVEL is set to any  
    value other than zero.  
  
    INVALID_VALUE is generated when GetTexImage is called with a lod not  
    zero when the tex is TEXTURE_RECTANGLE_ARB.  
  
homeprevnext New State
  
  - (Table 6.15, Texture Objects, pg. 241) amend/add the following entries:  
      
    Get Value                      Type      Get Command  Initial Value   Description            Sec     Attribute  
    -----------------------------  -------   -----------  -------------   ---------------------  ------  --------------  
    TEXTURE_RECTANGLE_ARB          2* x B    IsEnabled    False           True if rectangular    3.8.15  texture/enable  
                                                                          texturing is enabled  
                                                                        
    TEXTURE_BINDING_RECTANGLE_ARB  2* x Z+   GetIntegerv  0               Texture object         3.8.11  texture  
                                                                          for texture rectangle  
                                                                        
    TEXTURE_RECTANGLE_ARB          n x I     GetTexImage  see 3.8         rectangular texture    3.8     -  
                                                                          image for lod 0  
      
      
  - (Table 6.16, Texture Objects (cont.), pg. 242) amend/add the following entries:  
      
    Get Value             Type    Get Command       Initial Value     Description           Sec    Attribute  
    ------------------    -----   --------------    --------------    -------------------   -----  --------------  
    TEXTURE_MIN_FILTER    n x Z6  GetTexParameter   See 3.8 except    Texture minification  3.8.8  texture  
                                                    for rectangular   function  
                                                    which is  
                                                    LINEAR  
                                                      
    TEXTURE_WRAP_S        n x Z5  GetTexParameter   REPEAT except     Texture wrap mode S   3.8.7  texture  
                                                    for rectangular  
                                                    which is  
                                                    CLAMP_TO_EDGE  
                                                      
    TEXTURE_WRAP_T        n x Z5  GetTexParameter   REPEAT except     Texture wrap mode T   3.8.7  texture  
                                                    for rectangular   (2D, 3D, cubemap,  
                                                    which is          rectangle textures  
                                                    CLAMP_TO_EDGE     only)  
                                                      
    TEXTURE_WRAP_R        n x Z5  GetTexParameter   REPEAT except     Texture wrap mode R   3.8.7  texture  
                                                    for rectangular   (3D textures only)  
                                                    which is  
                                                    CLAMP_TO_EDGE  
  
homeprevnext New Implementation Dependent State
  
  - (Table 6.28, Implementation Dependent Values, pg. 254) add the following entry:  
  
    Get Value                       Type    Get Command   Minimum Value   Description           Sec    Attribute  
    --------                        ----    -----------   -------------   -----------           -----  --------------  
    MAX_RECTANGLE_TEXTURE_SIZE_ARB   Z+     GetIntegerv   64              Maximum rectangular   3.8.1  -  
                                                                          texture image  
                                                                          dimension  
  
Backwards Compatibility  
  
    This extension is semantically equivalent to EXT_texture_rectangle  
    and NV_texture_rectangle.  The tokens, and name strings now refer  
    to ARB instead of EXT or NV.  Enumerant values are unchanged.   
      
homeprevnext Revision History
  
    3/5/2004 - Updated page numbers and other numbers to reflect OpenGL  
    1.5; removed bogus "Convolution" language saying how glGetTexImage  
    applies convolution (language was in 1.2.1 but removed in 1.3).  
    ARB_texture_non_power_of_two and EXT_texture_mirror_clamp interactions  
    added.  
  
    2/23/2005 - Fix the GLSL interaction.  
  
  
Valid XHTML 1.1! Valid CSS! Last update: November 14, 2006.
Cette page doit être lue avec un navigateur récent respectant le standard XHTML 1.1.