Back to the OpenGL extension cross reference
GL_ARB_texture_mirrored_repeat
ARB_texture_mirrored_repeat
Name Strings
GL_ARB_texture_mirrored_repeat
Contact
Bimal Poddar, Intel, bimal.poddar at intel.com
Dan Brokenshire, IBM, brokensh at us.ibm.com
Pat Brown, Nvidia, pbrown at nvidia.com
Status
Complete. Approved by ARB on October 16, 2001.
Version
Last modified date: 2001/09/20
Number
ARB Extension #21
Dependencies
This extension is written against the OpenGL 1.3 Specification.
However, this extension does not require OpenGL 1.3.
Overview
ARB_texture_mirrored_repeat extends the set of texture wrap modes to
include a mode (GL_MIRRORED_REPEAT_ARB) that effectively uses a texture
map twice as large at the original image in which the additional half,
for each coordinate, of the new image is a mirror image of the original
image.
This new mode relaxes the need to generate images whose opposite edges
match by using the original image to generate a matching "mirror image".
Issues
1. The spec clamps the final (u,v) coordinates to the range [0.5, 2^n-0.5].
This will produce the same effect as trapping a sample of the border texel
and using the corresponding edge texel. The choice of technique is purely
an implementation detail.
2. The IBM_texture_mirrored_repeat extension inadvertantly used an HP
enumerant value (0x8370) allocated by HP as an interleaved array format.
Should the enumerant value be changed if this becomes an ARB extension?
No, it is not worth the confusion created by having two different
enumerant value for the same token.
3. Should additional mirroring functions be added to this extension and
perhaps rename it to ARB_texture_mirror. For example, include the two
mirror modes (MIRROR_CLAMP_ATI and MIRROR_CLAMP_TO_EDGE_ATI) provided
for in the GL_ATI_texture_mirror_once extension.
No, these extensions are not interdependent and inclusion of the
mirror once will likely hinder the adoption of this extension.
None
Accepted by the <param> parameter of TexParameteri and TexParameterf,
and by the <params> parameter of TexParameteriv and TexParameterfv, when
their <pname> parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or
TEXTURE_WRAP_R:
GL_MIRRORED_REPEAT_ARB 0x8370
Additions to Chapter 2 of the GL Specification (OpenGL Operation)
None.
Additions to Chapter 3 of the GL Specification (Rasterization)
Modify Table 3.19, editing only the following lines:
Name Type Legal Values
============== ======= ====================
TEXTURE_WRAP_S integer CLAMP, CLAMP_TO_EDGE, REPEAT,
CLAMP_TO_BORDER_ARB, MIRRORED_REPEAT_ARB
TEXTURE_WRAP_T integer CLAMP, CLAMP_TO_EDGE, REPEAT,
CLAMP_TO_BORDER_ARB, MIRRORED_REPEAT_ARB
TEXTURE_WRAP_R integer CLAMP, CLAMP_TO_EDGE, REPEAT,
CLAMP_TO_BORDER_ARB, MIRRORED_REPEAT_ARB
Add to end of Section 3.8.5 (Subsection "Texture Wrap Modes")
If TEXTURE_WRAP_S, TEXTURE_WRAP_T, or TEXTURE_WRAP_R is set to
MIRRORED_REPEAT_ARB, the s (or t or r) coordinate is converted to:
s - floor(s), if floor(s) is even, or
1 - (s - floor(s)), if floor(s) is odd.
The converted s (or t or r) coordinate is then clamped
as described for CLAMP_TO_EDGE texture coordinate clamping.
Additions to Chapter 4 of the GL Specification (Per-Fragment Operations
and the Framebuffer)
None
Additions to Chapter 5 of the GL Specification (Special Functions)
None
Additions to Chapter 6 of the GL Specification (State and State Requests)
None
Additions to Appendix F of the GL Specification (ARB Extensions)
None
Additions to the GLX Specification
None
GLX Protocol
None.
Errors
None
New State
Only the type information changes for these parameters:
Initial
Get Value Get Command Type Value Description Sec. Attrib
--------- ----------- ---- ------- ----------- ---- ------
TEXTURE_WRAP_S GetTexParameteriv n x Z5 REPEAT Texture Wrap Mode S 3.8 texture
TEXTURE_WRAP_T GetTexParameteriv n x Z5 REPEAT Texture Wrap Mode T 3.8 texture
TEXTURE_WRAP_R GetTexParameteriv n x Z5 REPEAT Texture Wrap Mode R 3.8 texture
New Implementation Dependent State
None
Revision History
01/09/20 bpoddar - Moved description for section 3.8.5 to the end
to avoid a forward reference
- Changed to using the old enumerant
- Minor typo/email address fixes
01/09/11 bpoddar - Updated for OpenGL 1.3 spec.
- Minor change to description of clamping.
01/03/22 brokensh Converted the IBM extension to a ARB extension
written against the latest specification.
Implementation Support
List of OpenGL implementations supporting the GL_ARB_texture_mirrored_repeat extension
Original File
Original text file for the GL_ARB_texture_mirrored_repeat extension
Page generated on Sun Nov 20 18:36:05 2005