15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci SGIS_texture_border_clamp 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_SGIS_texture_border_clamp 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciVersion 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci $Date: 1997/02/26 03:36:33 $ $Revision: 1.6 $ 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciNumber 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci 36 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciDependencies 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci EXT_texture3D affects the definition of this extension 205bd8deadSopenharmony_ci SGIS_texture_filter4 affects the definition of this extension 215bd8deadSopenharmony_ci 225bd8deadSopenharmony_ciOverview 235bd8deadSopenharmony_ci 245bd8deadSopenharmony_ci The base OpenGL provides clamping such that the texture coordinates are 255bd8deadSopenharmony_ci limited to exactly the range [0,1]. When a texture coordinate is 265bd8deadSopenharmony_ci clamped using this algorithm, the texture sampling filter straddles the 275bd8deadSopenharmony_ci edge of the texture image, taking 1/2 its sample values from within the 285bd8deadSopenharmony_ci texture image, and the other 1/2 from the texture border. It is 295bd8deadSopenharmony_ci sometimes desirable for a texture to be clamped to the border color, 305bd8deadSopenharmony_ci rather than to an average of the border and edge colors. 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ci This extension defines an additional texture clamping algorithm. 335bd8deadSopenharmony_ci CLAMP_TO_BORDER_SGIS clamps texture coordinates at all mipmap levels 345bd8deadSopenharmony_ci such that NEAREST and LINEAR filters return the color of the border 355bd8deadSopenharmony_ci texels. When used with FILTER4 filters, the filter operation of 365bd8deadSopenharmony_ci CLAMP_TO_BORDER_SGIS is defined but doesn't result in a nice 375bd8deadSopenharmony_ci clamp-to-border color. 385bd8deadSopenharmony_ci 395bd8deadSopenharmony_ciIssues 405bd8deadSopenharmony_ci 415bd8deadSopenharmony_ci * Is the arithmetic for FILTER4 filters correct? Is this the right 425bd8deadSopenharmony_ci thing to do? 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ciNew Procedures and Functions 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ci None 475bd8deadSopenharmony_ci 485bd8deadSopenharmony_ciNew Tokens 495bd8deadSopenharmony_ci 505bd8deadSopenharmony_ci Accepted by the <param> parameter of TexParameteri and TexParameterf, 515bd8deadSopenharmony_ci and by the <params> parameter of TexParameteriv and TexParameterfv, when 525bd8deadSopenharmony_ci their <pname> parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or 535bd8deadSopenharmony_ci TEXTURE_WRAP_R_EXT: 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ci CLAMP_TO_BORDER_SGIS 0x812D 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.0 Specification (OpenGL Operation) 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ci None 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.0 Specification (Rasterization) 625bd8deadSopenharmony_ci 635bd8deadSopenharmony_ci GL Specification Table 3.7 is updated as follows: 645bd8deadSopenharmony_ci 655bd8deadSopenharmony_ci Name Type Legal Values 665bd8deadSopenharmony_ci ---- ---- ------------ 675bd8deadSopenharmony_ci TEXTURE_WRAP_S integer CLAMP, REPEAT, 685bd8deadSopenharmony_ci CLAMP_TO_EDGE_SGIS, 695bd8deadSopenharmony_ci CLAMP_TO_BORDER_SGIS 705bd8deadSopenharmony_ci TEXTURE_WRAP_T integer CLAMP, REPEAT, 715bd8deadSopenharmony_ci CLAMP_TO_EDGE_SGIS, 725bd8deadSopenharmony_ci CLAMP_TO_BORDER_SGIS 735bd8deadSopenharmony_ci TEXTURE_WRAP_R_EXT integer CLAMP, REPEAT, 745bd8deadSopenharmony_ci CLAMP_TO_EDGE_SGIS, 755bd8deadSopenharmony_ci CLAMP_TO_BORDER_SGIS 765bd8deadSopenharmony_ci TEXTURE_MIN_FILTER integer NEAREST, LINEAR, 775bd8deadSopenharmony_ci NEAREST_MIPMAP_NEAREST, 785bd8deadSopenharmony_ci NEAREST_MIPMAP_LINEAR, 795bd8deadSopenharmony_ci LINEAR_MIPMAP_NEAREST, 805bd8deadSopenharmony_ci LINEAR_MIPMAP_LINEAR, 815bd8deadSopenharmony_ci FILTER4_SGIS, 825bd8deadSopenharmony_ci LINEAR_CLIPMAP_LINEAR_SGIX 835bd8deadSopenharmony_ci TEXTURE_MAG_FILTER integer NEAREST, LINEAR, 845bd8deadSopenharmony_ci FILTER4_SGIS, 855bd8deadSopenharmony_ci LINEAR_DETAIL_SGIS, 865bd8deadSopenharmony_ci LINEAR_DETAIL_ALPHA_SGIS, 875bd8deadSopenharmony_ci LINEAR_DETAIL_COLOR_SGIS, 885bd8deadSopenharmony_ci LINEAR_SHARPEN_SGIS, 895bd8deadSopenharmony_ci LINEAR_SHARPEN_ALPHA_SGIS, 905bd8deadSopenharmony_ci LINEAR_SHARPEN_COLOR_SGIS, 915bd8deadSopenharmony_ci LINEAR_LEQUAL_R_SGIS, 925bd8deadSopenharmony_ci LINEAR_GEQUAL_R_SGIS 935bd8deadSopenharmony_ci TEXTURE_BORDER_COLOR 4 floats any 4 values in [0,1] 945bd8deadSopenharmony_ci DETAIL_TEXTURE_LEVEL_SGIS integer any non-negative integer 955bd8deadSopenharmony_ci DETAIL_TEXTURE_MODE_SGIS integer ADD, MODULATE 965bd8deadSopenharmony_ci TEXTURE_MIN_LOD_SGIS float any value 975bd8deadSopenharmony_ci TEXTURE_MAX_LOD_SGIS float any value 985bd8deadSopenharmony_ci TEXTURE_BASE_LEVEL_SGIS integer any non-negative integer 995bd8deadSopenharmony_ci TEXTURE_MAX_LEVEL_SGIS integer any non-negative integer 1005bd8deadSopenharmony_ci GENERATE_MIPMAP_SGIS boolean TRUE or FALSE 1015bd8deadSopenharmony_ci TEXTURE_CLIPMAP_OFFSET_SGIX 2 floats any 2 values 1025bd8deadSopenharmony_ci 1035bd8deadSopenharmony_ci Table 3.7: Texture parameters and their values. 1045bd8deadSopenharmony_ci 1055bd8deadSopenharmony_ci CLAMP_TO_BORDER_SGIS texture clamping is specified by calling 1065bd8deadSopenharmony_ci TexParameteri with <target> set to TEXTURE_1D, TEXTURE_2D, or 1075bd8deadSopenharmony_ci TEXTURE_3D_EXT, <pname> set to TEXTURE_WRAP_S, TEXTURE_WRAP_T, 1085bd8deadSopenharmony_ci or TEXTURE_WRAP_R_EXT, and <param> set to CLAMP_TO_BORDER_SGIS. 1095bd8deadSopenharmony_ci 1105bd8deadSopenharmony_ci Let [min,max] be the range of a clamped texture coordinate, and let N 1115bd8deadSopenharmony_ci be the size of the 1D, 2D, or 3D texture image in the direction of 1125bd8deadSopenharmony_ci clamping. Then in all cases 1135bd8deadSopenharmony_ci 1145bd8deadSopenharmony_ci max = 1 - min 1155bd8deadSopenharmony_ci 1165bd8deadSopenharmony_ci because the clamping is always symmetric about the [0,1] mapped range of 1175bd8deadSopenharmony_ci a texture coordinate. When used with NEAREST or LINEAR filters, 1185bd8deadSopenharmony_ci CLAMP_TO_BORDER_SGIS defines a minimum clamping value of 1195bd8deadSopenharmony_ci 1205bd8deadSopenharmony_ci min = -1 / 2*N 1215bd8deadSopenharmony_ci 1225bd8deadSopenharmony_ci When used with CUBIC filters, CLAMP_TO_BORDER_SGIS defines a minimum 1235bd8deadSopenharmony_ci clamping value of 1245bd8deadSopenharmony_ci 1255bd8deadSopenharmony_ci min = -3 / 2*N 1265bd8deadSopenharmony_ci 1275bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations 1285bd8deadSopenharmony_ciand the Framebuffer) 1295bd8deadSopenharmony_ci 1305bd8deadSopenharmony_ci None 1315bd8deadSopenharmony_ci 1325bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.0 Specification (Special Functions) 1335bd8deadSopenharmony_ci 1345bd8deadSopenharmony_ci None 1355bd8deadSopenharmony_ci 1365bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.0 Specification (State and State Requests) 1375bd8deadSopenharmony_ci 1385bd8deadSopenharmony_ci None 1395bd8deadSopenharmony_ci 1405bd8deadSopenharmony_ciAdditions to the GLX Specification 1415bd8deadSopenharmony_ci 1425bd8deadSopenharmony_ci None 1435bd8deadSopenharmony_ci 1445bd8deadSopenharmony_ciDependencies on EXT_texture3D 1455bd8deadSopenharmony_ci 1465bd8deadSopenharmony_ci If EXT_texture3D is not implemented, then the references clamping of 3D 1475bd8deadSopenharmony_ci textures in this file are invalid, and references to TEXTURE_WRAP_R_EXT 1485bd8deadSopenharmony_ci should be ignored. 1495bd8deadSopenharmony_ci 1505bd8deadSopenharmony_ciDependencies on SGIS_texture_filter4 1515bd8deadSopenharmony_ci 1525bd8deadSopenharmony_ci If SGIS_texture_filter4 is not implemented, then discussions about the 1535bd8deadSopenharmony_ci interaction of filter4 texture filters and the clamping function 1545bd8deadSopenharmony_ci described in this file are invalid, and should be ignored. 1555bd8deadSopenharmony_ci 1565bd8deadSopenharmony_ciErrors 1575bd8deadSopenharmony_ci 1585bd8deadSopenharmony_ci None 1595bd8deadSopenharmony_ci 1605bd8deadSopenharmony_ciNew State 1615bd8deadSopenharmony_ci 1625bd8deadSopenharmony_ci Only the type information changes for these parameters: 1635bd8deadSopenharmony_ci 1645bd8deadSopenharmony_ci Get Value Get Command Type Initial Value Attrib 1655bd8deadSopenharmony_ci --------- ----------- ---- ------------- ------ 1665bd8deadSopenharmony_ci TEXTURE_WRAP_S GetTexParameteriv n x Z4 REPEAT texture 1675bd8deadSopenharmony_ci TEXTURE_WRAP_T GetTexParameteriv n x Z4 REPEAT texture 1685bd8deadSopenharmony_ci TEXTURE_WRAP_R_EXT GetTexParameteriv n x Z4 REPEAT texture 1695bd8deadSopenharmony_ci 1705bd8deadSopenharmony_ciNew Implementation Dependent State 1715bd8deadSopenharmony_ci 1725bd8deadSopenharmony_ci None 173