15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci ARB_texture_border_clamp 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_ARB_texture_border_clamp 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Patrick R. Brown, Intel Corporation (patrick.r.brown 'at' intel.com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciNotice 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci Copyright (c) 2000-2013 The Khronos Group Inc. Copyright terms at 165bd8deadSopenharmony_ci http://www.khronos.org/registry/speccopyright.html 175bd8deadSopenharmony_ci 185bd8deadSopenharmony_ciSpecification Update Policy 195bd8deadSopenharmony_ci 205bd8deadSopenharmony_ci Khronos-approved extension specifications are updated in response to 215bd8deadSopenharmony_ci issues and bugs prioritized by the Khronos OpenGL Working Group. For 225bd8deadSopenharmony_ci extensions which have been promoted to a core Specification, fixes will 235bd8deadSopenharmony_ci first appear in the latest version of that core Specification, and will 245bd8deadSopenharmony_ci eventually be backported to the extension document. This policy is 255bd8deadSopenharmony_ci described in more detail at 265bd8deadSopenharmony_ci https://www.khronos.org/registry/OpenGL/docs/update_policy.php 275bd8deadSopenharmony_ci 285bd8deadSopenharmony_ciStatus 295bd8deadSopenharmony_ci 305bd8deadSopenharmony_ci Complete. Approved by the ARB, 20 June 2000 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ciVersion 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci 1.0, 22 June 2000 355bd8deadSopenharmony_ci 365bd8deadSopenharmony_ciNumber 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ci ARB Extension #13 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ciDependencies 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ci OpenGL 1.0 is required. 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ci This extension is written against the OpenGL 1.2.1 Specification. 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ci This extension is based on and intended to replace 475bd8deadSopenharmony_ci GL_SGIS_texture_border_clamp. 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ciOverview 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ci The base OpenGL provides clamping such that the texture coordinates are 525bd8deadSopenharmony_ci limited to exactly the range [0,1]. When a texture coordinate is clamped 535bd8deadSopenharmony_ci using this algorithm, the texture sampling filter straddles the edge of 545bd8deadSopenharmony_ci the texture image, taking 1/2 its sample values from within the texture 555bd8deadSopenharmony_ci image, and the other 1/2 from the texture border. It is sometimes 565bd8deadSopenharmony_ci desirable for a texture to be clamped to the border color, rather than to 575bd8deadSopenharmony_ci an average of the border and edge colors. 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ci This extension defines an additional texture clamping algorithm. 605bd8deadSopenharmony_ci CLAMP_TO_BORDER_ARB clamps texture coordinates at all mipmap levels such 615bd8deadSopenharmony_ci that NEAREST and LINEAR filters return only the color of the border 625bd8deadSopenharmony_ci texels. 635bd8deadSopenharmony_ci 645bd8deadSopenharmony_ciIP Status 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ci No known IP issues. 675bd8deadSopenharmony_ci 685bd8deadSopenharmony_ciIssues 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ci (1) Is this formulation correct for higher-order texture filters 715bd8deadSopenharmony_ci (e.g., cubic or anisotropic filters)? 725bd8deadSopenharmony_ci 735bd8deadSopenharmony_ci RESOLVED: No. A more appropriate formulation would clamp the texture 745bd8deadSopenharmony_ci coordinates in texel space. 755bd8deadSopenharmony_ci 765bd8deadSopenharmony_ciNew Procedures and Functions 775bd8deadSopenharmony_ci 785bd8deadSopenharmony_ci None. 795bd8deadSopenharmony_ci 805bd8deadSopenharmony_ciNew Tokens 815bd8deadSopenharmony_ci 825bd8deadSopenharmony_ci Accepted by the <param> parameter of TexParameteri and TexParameterf, and 835bd8deadSopenharmony_ci by the <params> parameter of TexParameteriv and TexParameterfv, when their 845bd8deadSopenharmony_ci <pname> parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or TEXTURE_WRAP_R: 855bd8deadSopenharmony_ci 865bd8deadSopenharmony_ci CLAMP_TO_BORDER_ARB 0x812D 875bd8deadSopenharmony_ci 885bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 1.2.1 Specification (OpenGL Operation) 895bd8deadSopenharmony_ci 905bd8deadSopenharmony_ci None. 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 1.2.1 Specification (Rasterization) 935bd8deadSopenharmony_ci 945bd8deadSopenharmony_ci Modify Table 3.17, p. 124, editing only the following lines: 955bd8deadSopenharmony_ci 965bd8deadSopenharmony_ci Name Type Legal Values 975bd8deadSopenharmony_ci ============== ======= ==================== 985bd8deadSopenharmony_ci TEXTURE_WRAP_S integer CLAMP, CLAMP_TO_EDGE, REPEAT, 995bd8deadSopenharmony_ci CLAMP_TO_BORDER_ARB 1005bd8deadSopenharmony_ci TEXTURE_WRAP_T integer CLAMP, CLAMP_TO_EDGE, REPEAT, 1015bd8deadSopenharmony_ci CLAMP_TO_BORDER_ARB 1025bd8deadSopenharmony_ci TEXTURE_WRAP_R integer CLAMP, CLAMP_TO_EDGE, REPEAT, 1035bd8deadSopenharmony_ci CLAMP_TO_BORDER_ARB 1045bd8deadSopenharmony_ci 1055bd8deadSopenharmony_ci 1065bd8deadSopenharmony_ci Modify Section 3.8.4, Texture Wrap Modes, p.124 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ci (add at the end of the section, p. 125) 1095bd8deadSopenharmony_ci 1105bd8deadSopenharmony_ci CLAMP_TO_BORDER_ARB clamps texture coordinates at all mipmaps such that 1115bd8deadSopenharmony_ci the texture filter always samples border texels for fragments whose 1125bd8deadSopenharmony_ci corresponding texture coordinate is sufficiently far outside the range 1135bd8deadSopenharmony_ci [0,1]. The color returned when clamping is derived only from the border 1145bd8deadSopenharmony_ci texels of the texture image, or from the constant border color if the 1155bd8deadSopenharmony_ci texture image does not have a border. 1165bd8deadSopenharmony_ci 1175bd8deadSopenharmony_ci Texture coordinates are clamped to the range [min, max]. The minimum 1185bd8deadSopenharmony_ci value is defined as 1195bd8deadSopenharmony_ci 1205bd8deadSopenharmony_ci min = -1 / 2N 1215bd8deadSopenharmony_ci 1225bd8deadSopenharmony_ci where N is the size (not including borders) of the one-, two-, or 1235bd8deadSopenharmony_ci three-dimensional texture image in the direction of clamping. The maximum 1245bd8deadSopenharmony_ci value is defined as 1255bd8deadSopenharmony_ci 1265bd8deadSopenharmony_ci max = 1 - min 1275bd8deadSopenharmony_ci 1285bd8deadSopenharmony_ci so that clamping is always symmetric about the [0,1] mapped range of a 1295bd8deadSopenharmony_ci texture coordinate. 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 1.2.1 Specification (Per-Fragment 1325bd8deadSopenharmony_ciOperations and the Frame Buffer) 1335bd8deadSopenharmony_ci 1345bd8deadSopenharmony_ci None. 1355bd8deadSopenharmony_ci 1365bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 1.2.1 Specification (Special Functions) 1375bd8deadSopenharmony_ci 1385bd8deadSopenharmony_ci None. 1395bd8deadSopenharmony_ci 1405bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 1.2.1 Specification (State and 1415bd8deadSopenharmony_ciState Requests) 1425bd8deadSopenharmony_ci 1435bd8deadSopenharmony_ci None. 1445bd8deadSopenharmony_ci 1455bd8deadSopenharmony_ciAdditions to Appendix A of the OpenGL 1.2.1 Specification (Invariance) 1465bd8deadSopenharmony_ci 1475bd8deadSopenharmony_ci None. 1485bd8deadSopenharmony_ci 1495bd8deadSopenharmony_ciAdditions to the AGL/GLX/WGL Specifications 1505bd8deadSopenharmony_ci 1515bd8deadSopenharmony_ci None. 1525bd8deadSopenharmony_ci 1535bd8deadSopenharmony_ciGLX Protocol 1545bd8deadSopenharmony_ci 1555bd8deadSopenharmony_ci None. 1565bd8deadSopenharmony_ci 1575bd8deadSopenharmony_ciErrors 1585bd8deadSopenharmony_ci 1595bd8deadSopenharmony_ci None. 1605bd8deadSopenharmony_ci 1615bd8deadSopenharmony_ciNew State 1625bd8deadSopenharmony_ci 1635bd8deadSopenharmony_ci Only the type information changes for these parameters. 1645bd8deadSopenharmony_ci 1655bd8deadSopenharmony_ci (table 6.13, p. 203) 1665bd8deadSopenharmony_ci Initial 1675bd8deadSopenharmony_ci Get Value Type Get Command Value Description Sec. Attribute 1685bd8deadSopenharmony_ci --------- ---- ----------- ------- ----------- ---- --------- 1695bd8deadSopenharmony_ci TEXTURE_WRAP_S 3+ x Z4 GetTexParameter REPEAT Texture wrap 3.8 texture 1705bd8deadSopenharmony_ci TEXTURE_WRAP_T 3+ x Z4 GetTexParameter REPEAT Texture wrap 3.8 texture 1715bd8deadSopenharmony_ci TEXTURE_WRAP_R 3+ x Z4 GetTexParameter REPEAT Texture wrap 3.8 texture 1725bd8deadSopenharmony_ci 1735bd8deadSopenharmony_ciRevision History 1745bd8deadSopenharmony_ci 1755bd8deadSopenharmony_ci 1.0, 06/22/2000 prbrown1: Added issue w.r.t. higher order filters. 1765bd8deadSopenharmony_ci 1775bd8deadSopenharmony_ci 0.2, 05/23/2000 prbrown1: Removed dependency on SGIS_texture_filter4 1785bd8deadSopenharmony_ci per ARB guidelines. 1795bd8deadSopenharmony_ci 1805bd8deadSopenharmony_ci 0.1, 05/02/2000 prbrown1: Initial revision -- mostly stolen from 1815bd8deadSopenharmony_ci GL_SGIS_texture_border_clamp. 1825bd8deadSopenharmony_ci 183