1Name 2 3 ARB_texture_mirrored_repeat 4 5Name Strings 6 7 GL_ARB_texture_mirrored_repeat 8 9Contact 10 11 Bimal Poddar, Intel, bimal.poddar at intel.com 12 Dan Brokenshire, IBM, brokensh at us.ibm.com 13 Pat Brown, Nvidia, pbrown at nvidia.com 14 15Notice 16 17 Copyright (c) 2001-2013 The Khronos Group Inc. Copyright terms at 18 http://www.khronos.org/registry/speccopyright.html 19 20Specification Update Policy 21 22 Khronos-approved extension specifications are updated in response to 23 issues and bugs prioritized by the Khronos OpenGL Working Group. For 24 extensions which have been promoted to a core Specification, fixes will 25 first appear in the latest version of that core Specification, and will 26 eventually be backported to the extension document. This policy is 27 described in more detail at 28 https://www.khronos.org/registry/OpenGL/docs/update_policy.php 29 30Status 31 32 Complete. Approved by ARB on October 16, 2001. 33 34Version 35 36 Last modified date: 2001/09/20 37 38Number 39 40 ARB Extension #21 41 42Dependencies 43 44 This extension is written against the OpenGL 1.3 Specification. 45 However, this extension does not require OpenGL 1.3. 46 47Overview 48 49 ARB_texture_mirrored_repeat extends the set of texture wrap modes to 50 include a mode (GL_MIRRORED_REPEAT_ARB) that effectively uses a texture 51 map twice as large at the original image in which the additional half, 52 for each coordinate, of the new image is a mirror image of the original 53 image. 54 55 This new mode relaxes the need to generate images whose opposite edges 56 match by using the original image to generate a matching "mirror image". 57 58Issues 59 60 1. The spec clamps the final (u,v) coordinates to the range [0.5, 2^n-0.5]. 61 This will produce the same effect as trapping a sample of the border texel 62 and using the corresponding edge texel. The choice of technique is purely 63 an implementation detail. 64 65 66 2. The IBM_texture_mirrored_repeat extension inadvertantly used an HP 67 enumerant value (0x8370) allocated by HP as an interleaved array format. 68 Should the enumerant value be changed if this becomes an ARB extension? 69 70 No, it is not worth the confusion created by having two different 71 enumerant value for the same token. 72 73 3. Should additional mirroring functions be added to this extension and 74 perhaps rename it to ARB_texture_mirror. For example, include the two 75 mirror modes (MIRROR_CLAMP_ATI and MIRROR_CLAMP_TO_EDGE_ATI) provided 76 for in the GL_ATI_texture_mirror_once extension. 77 78 No, these extensions are not interdependent and inclusion of the 79 mirror once will likely hinder the adoption of this extension. 80 81New Procedures and Functions 82 83 None 84 85New Tokens 86 87 Accepted by the <param> parameter of TexParameteri and TexParameterf, 88 and by the <params> parameter of TexParameteriv and TexParameterfv, when 89 their <pname> parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or 90 TEXTURE_WRAP_R: 91 92 GL_MIRRORED_REPEAT_ARB 0x8370 93 94Additions to Chapter 2 of the GL Specification (OpenGL Operation) 95 96 None. 97 98Additions to Chapter 3 of the GL Specification (Rasterization) 99 100 Modify Table 3.19, editing only the following lines: 101 102 Name Type Legal Values 103 ============== ======= ==================== 104 TEXTURE_WRAP_S integer CLAMP, CLAMP_TO_EDGE, REPEAT, 105 CLAMP_TO_BORDER_ARB, MIRRORED_REPEAT_ARB 106 TEXTURE_WRAP_T integer CLAMP, CLAMP_TO_EDGE, REPEAT, 107 CLAMP_TO_BORDER_ARB, MIRRORED_REPEAT_ARB 108 TEXTURE_WRAP_R integer CLAMP, CLAMP_TO_EDGE, REPEAT, 109 CLAMP_TO_BORDER_ARB, MIRRORED_REPEAT_ARB 110 111 Add to end of Section 3.8.5 (Subsection "Texture Wrap Modes") 112 113 If TEXTURE_WRAP_S, TEXTURE_WRAP_T, or TEXTURE_WRAP_R is set to 114 MIRRORED_REPEAT_ARB, the s (or t or r) coordinate is converted to: 115 116 s - floor(s), if floor(s) is even, or 117 1 - (s - floor(s)), if floor(s) is odd. 118 119 The converted s (or t or r) coordinate is then clamped 120 as described for CLAMP_TO_EDGE texture coordinate clamping. 121 122Additions to Chapter 4 of the GL Specification (Per-Fragment Operations 123and the Framebuffer) 124 125 None 126 127Additions to Chapter 5 of the GL Specification (Special Functions) 128 129 None 130 131Additions to Chapter 6 of the GL Specification (State and State Requests) 132 133 None 134 135Additions to Appendix F of the GL Specification (ARB Extensions) 136 137 None 138 139Additions to the GLX Specification 140 141 None 142 143GLX Protocol 144 145 None. 146 147Errors 148 149 None 150 151New State 152 153 Only the type information changes for these parameters: 154 155 Initial 156 Get Value Get Command Type Value Description Sec. Attrib 157 --------- ----------- ---- ------- ----------- ---- ------ 158 TEXTURE_WRAP_S GetTexParameteriv n x Z5 REPEAT Texture Wrap Mode S 3.8 texture 159 TEXTURE_WRAP_T GetTexParameteriv n x Z5 REPEAT Texture Wrap Mode T 3.8 texture 160 TEXTURE_WRAP_R GetTexParameteriv n x Z5 REPEAT Texture Wrap Mode R 3.8 texture 161 162New Implementation Dependent State 163 164 None 165 166 167Revision History 168 01/09/20 bpoddar - Moved description for section 3.8.5 to the end 169 to avoid a forward reference 170 - Changed to using the old enumerant 171 - Minor typo/email address fixes 172 173 01/09/11 bpoddar - Updated for OpenGL 1.3 spec. 174 - Minor change to description of clamping. 175 176 01/03/22 brokensh Converted the IBM extension to a ARB extension 177 written against the latest specification. 178