15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci ARB_texture_mirrored_repeat 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_ARB_texture_mirrored_repeat 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Bimal Poddar, Intel, bimal.poddar at intel.com 125bd8deadSopenharmony_ci Dan Brokenshire, IBM, brokensh at us.ibm.com 135bd8deadSopenharmony_ci Pat Brown, Nvidia, pbrown at nvidia.com 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ciNotice 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ci Copyright (c) 2001-2013 The Khronos Group Inc. Copyright terms at 185bd8deadSopenharmony_ci http://www.khronos.org/registry/speccopyright.html 195bd8deadSopenharmony_ci 205bd8deadSopenharmony_ciSpecification Update Policy 215bd8deadSopenharmony_ci 225bd8deadSopenharmony_ci Khronos-approved extension specifications are updated in response to 235bd8deadSopenharmony_ci issues and bugs prioritized by the Khronos OpenGL Working Group. For 245bd8deadSopenharmony_ci extensions which have been promoted to a core Specification, fixes will 255bd8deadSopenharmony_ci first appear in the latest version of that core Specification, and will 265bd8deadSopenharmony_ci eventually be backported to the extension document. This policy is 275bd8deadSopenharmony_ci described in more detail at 285bd8deadSopenharmony_ci https://www.khronos.org/registry/OpenGL/docs/update_policy.php 295bd8deadSopenharmony_ci 305bd8deadSopenharmony_ciStatus 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ci Complete. Approved by ARB on October 16, 2001. 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ciVersion 355bd8deadSopenharmony_ci 365bd8deadSopenharmony_ci Last modified date: 2001/09/20 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ciNumber 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ci ARB Extension #21 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ciDependencies 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ci This extension is written against the OpenGL 1.3 Specification. 455bd8deadSopenharmony_ci However, this extension does not require OpenGL 1.3. 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ciOverview 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ci ARB_texture_mirrored_repeat extends the set of texture wrap modes to 505bd8deadSopenharmony_ci include a mode (GL_MIRRORED_REPEAT_ARB) that effectively uses a texture 515bd8deadSopenharmony_ci map twice as large at the original image in which the additional half, 525bd8deadSopenharmony_ci for each coordinate, of the new image is a mirror image of the original 535bd8deadSopenharmony_ci image. 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ci This new mode relaxes the need to generate images whose opposite edges 565bd8deadSopenharmony_ci match by using the original image to generate a matching "mirror image". 575bd8deadSopenharmony_ci 585bd8deadSopenharmony_ciIssues 595bd8deadSopenharmony_ci 605bd8deadSopenharmony_ci 1. The spec clamps the final (u,v) coordinates to the range [0.5, 2^n-0.5]. 615bd8deadSopenharmony_ci This will produce the same effect as trapping a sample of the border texel 625bd8deadSopenharmony_ci and using the corresponding edge texel. The choice of technique is purely 635bd8deadSopenharmony_ci an implementation detail. 645bd8deadSopenharmony_ci 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ci 2. The IBM_texture_mirrored_repeat extension inadvertantly used an HP 675bd8deadSopenharmony_ci enumerant value (0x8370) allocated by HP as an interleaved array format. 685bd8deadSopenharmony_ci Should the enumerant value be changed if this becomes an ARB extension? 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ci No, it is not worth the confusion created by having two different 715bd8deadSopenharmony_ci enumerant value for the same token. 725bd8deadSopenharmony_ci 735bd8deadSopenharmony_ci 3. Should additional mirroring functions be added to this extension and 745bd8deadSopenharmony_ci perhaps rename it to ARB_texture_mirror. For example, include the two 755bd8deadSopenharmony_ci mirror modes (MIRROR_CLAMP_ATI and MIRROR_CLAMP_TO_EDGE_ATI) provided 765bd8deadSopenharmony_ci for in the GL_ATI_texture_mirror_once extension. 775bd8deadSopenharmony_ci 785bd8deadSopenharmony_ci No, these extensions are not interdependent and inclusion of the 795bd8deadSopenharmony_ci mirror once will likely hinder the adoption of this extension. 805bd8deadSopenharmony_ci 815bd8deadSopenharmony_ciNew Procedures and Functions 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ci None 845bd8deadSopenharmony_ci 855bd8deadSopenharmony_ciNew Tokens 865bd8deadSopenharmony_ci 875bd8deadSopenharmony_ci Accepted by the <param> parameter of TexParameteri and TexParameterf, 885bd8deadSopenharmony_ci and by the <params> parameter of TexParameteriv and TexParameterfv, when 895bd8deadSopenharmony_ci their <pname> parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or 905bd8deadSopenharmony_ci TEXTURE_WRAP_R: 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ci GL_MIRRORED_REPEAT_ARB 0x8370 935bd8deadSopenharmony_ci 945bd8deadSopenharmony_ciAdditions to Chapter 2 of the GL Specification (OpenGL Operation) 955bd8deadSopenharmony_ci 965bd8deadSopenharmony_ci None. 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ciAdditions to Chapter 3 of the GL Specification (Rasterization) 995bd8deadSopenharmony_ci 1005bd8deadSopenharmony_ci Modify Table 3.19, editing only the following lines: 1015bd8deadSopenharmony_ci 1025bd8deadSopenharmony_ci Name Type Legal Values 1035bd8deadSopenharmony_ci ============== ======= ==================== 1045bd8deadSopenharmony_ci TEXTURE_WRAP_S integer CLAMP, CLAMP_TO_EDGE, REPEAT, 1055bd8deadSopenharmony_ci CLAMP_TO_BORDER_ARB, MIRRORED_REPEAT_ARB 1065bd8deadSopenharmony_ci TEXTURE_WRAP_T integer CLAMP, CLAMP_TO_EDGE, REPEAT, 1075bd8deadSopenharmony_ci CLAMP_TO_BORDER_ARB, MIRRORED_REPEAT_ARB 1085bd8deadSopenharmony_ci TEXTURE_WRAP_R integer CLAMP, CLAMP_TO_EDGE, REPEAT, 1095bd8deadSopenharmony_ci CLAMP_TO_BORDER_ARB, MIRRORED_REPEAT_ARB 1105bd8deadSopenharmony_ci 1115bd8deadSopenharmony_ci Add to end of Section 3.8.5 (Subsection "Texture Wrap Modes") 1125bd8deadSopenharmony_ci 1135bd8deadSopenharmony_ci If TEXTURE_WRAP_S, TEXTURE_WRAP_T, or TEXTURE_WRAP_R is set to 1145bd8deadSopenharmony_ci MIRRORED_REPEAT_ARB, the s (or t or r) coordinate is converted to: 1155bd8deadSopenharmony_ci 1165bd8deadSopenharmony_ci s - floor(s), if floor(s) is even, or 1175bd8deadSopenharmony_ci 1 - (s - floor(s)), if floor(s) is odd. 1185bd8deadSopenharmony_ci 1195bd8deadSopenharmony_ci The converted s (or t or r) coordinate is then clamped 1205bd8deadSopenharmony_ci as described for CLAMP_TO_EDGE texture coordinate clamping. 1215bd8deadSopenharmony_ci 1225bd8deadSopenharmony_ciAdditions to Chapter 4 of the GL Specification (Per-Fragment Operations 1235bd8deadSopenharmony_ciand the Framebuffer) 1245bd8deadSopenharmony_ci 1255bd8deadSopenharmony_ci None 1265bd8deadSopenharmony_ci 1275bd8deadSopenharmony_ciAdditions to Chapter 5 of the GL Specification (Special Functions) 1285bd8deadSopenharmony_ci 1295bd8deadSopenharmony_ci None 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ciAdditions to Chapter 6 of the GL Specification (State and State Requests) 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ci None 1345bd8deadSopenharmony_ci 1355bd8deadSopenharmony_ciAdditions to Appendix F of the GL Specification (ARB Extensions) 1365bd8deadSopenharmony_ci 1375bd8deadSopenharmony_ci None 1385bd8deadSopenharmony_ci 1395bd8deadSopenharmony_ciAdditions to the GLX Specification 1405bd8deadSopenharmony_ci 1415bd8deadSopenharmony_ci None 1425bd8deadSopenharmony_ci 1435bd8deadSopenharmony_ciGLX Protocol 1445bd8deadSopenharmony_ci 1455bd8deadSopenharmony_ci None. 1465bd8deadSopenharmony_ci 1475bd8deadSopenharmony_ciErrors 1485bd8deadSopenharmony_ci 1495bd8deadSopenharmony_ci None 1505bd8deadSopenharmony_ci 1515bd8deadSopenharmony_ciNew State 1525bd8deadSopenharmony_ci 1535bd8deadSopenharmony_ci Only the type information changes for these parameters: 1545bd8deadSopenharmony_ci 1555bd8deadSopenharmony_ci Initial 1565bd8deadSopenharmony_ci Get Value Get Command Type Value Description Sec. Attrib 1575bd8deadSopenharmony_ci --------- ----------- ---- ------- ----------- ---- ------ 1585bd8deadSopenharmony_ci TEXTURE_WRAP_S GetTexParameteriv n x Z5 REPEAT Texture Wrap Mode S 3.8 texture 1595bd8deadSopenharmony_ci TEXTURE_WRAP_T GetTexParameteriv n x Z5 REPEAT Texture Wrap Mode T 3.8 texture 1605bd8deadSopenharmony_ci TEXTURE_WRAP_R GetTexParameteriv n x Z5 REPEAT Texture Wrap Mode R 3.8 texture 1615bd8deadSopenharmony_ci 1625bd8deadSopenharmony_ciNew Implementation Dependent State 1635bd8deadSopenharmony_ci 1645bd8deadSopenharmony_ci None 1655bd8deadSopenharmony_ci 1665bd8deadSopenharmony_ci 1675bd8deadSopenharmony_ciRevision History 1685bd8deadSopenharmony_ci 01/09/20 bpoddar - Moved description for section 3.8.5 to the end 1695bd8deadSopenharmony_ci to avoid a forward reference 1705bd8deadSopenharmony_ci - Changed to using the old enumerant 1715bd8deadSopenharmony_ci - Minor typo/email address fixes 1725bd8deadSopenharmony_ci 1735bd8deadSopenharmony_ci 01/09/11 bpoddar - Updated for OpenGL 1.3 spec. 1745bd8deadSopenharmony_ci - Minor change to description of clamping. 1755bd8deadSopenharmony_ci 1765bd8deadSopenharmony_ci 01/03/22 brokensh Converted the IBM extension to a ARB extension 1775bd8deadSopenharmony_ci written against the latest specification. 178