15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci EXT_texture_border_clamp 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_EXT_texture_border_clamp 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Daniel Koch, NVIDIA (dkoch 'at' nvidia 'dot' com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciContributors 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci Jussi Rasanen, NVIDIA 165bd8deadSopenharmony_ci Greg Roth, NVIDIA 175bd8deadSopenharmony_ci Dominik Witczak, Mobica 185bd8deadSopenharmony_ci Graham Connor, Imagination 195bd8deadSopenharmony_ci Ben Bowman, Imagination 205bd8deadSopenharmony_ci Jonathan Putsman, Imagination 215bd8deadSopenharmony_ci Maurice Ribble, Qualcomm 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ciStatus 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ci Complete. 265bd8deadSopenharmony_ci 275bd8deadSopenharmony_ciVersion 285bd8deadSopenharmony_ci 295bd8deadSopenharmony_ci Date: April 23, 2014 305bd8deadSopenharmony_ci Revision: 6 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ciNumber 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci OpenGL ES Extension #182 355bd8deadSopenharmony_ci 365bd8deadSopenharmony_ciDependencies 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ci OpenGL ES 2.0 is required. 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ci This extension is written against the OpenGL ES 3.0.2 415bd8deadSopenharmony_ci specification. 425bd8deadSopenharmony_ci 435bd8deadSopenharmony_ci OpenGL ES 3.0 affects the definition of this extension. 445bd8deadSopenharmony_ci 455bd8deadSopenharmony_ci OES_texture_3D affects the definition of this extension. 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ci EXT_texture_compression_s3tc trivially affects the definition 485bd8deadSopenharmony_ci of this extension. 495bd8deadSopenharmony_ci 505bd8deadSopenharmony_ci KHR_texture_compression_astc_{ldr,hdr} trivially affect the 515bd8deadSopenharmony_ci definition of this extension. 525bd8deadSopenharmony_ci 535bd8deadSopenharmony_ciOverview 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ci OpenGL ES provides only a single clamping wrap mode: CLAMP_TO_EDGE. 565bd8deadSopenharmony_ci However, the ability to clamp to a constant border color can be 575bd8deadSopenharmony_ci useful to quickly detect texture coordinates that exceed their 585bd8deadSopenharmony_ci expected limits or to dummy out any such accesses with transparency 595bd8deadSopenharmony_ci or a neutral color in tiling or light maps. 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ci This extension defines an additional texture clamping algorithm. 625bd8deadSopenharmony_ci CLAMP_TO_BORDER_EXT clamps texture coordinates at all mipmap levels 635bd8deadSopenharmony_ci such that NEAREST and LINEAR filters of clamped coordinates return 645bd8deadSopenharmony_ci only the constant border color. This does not add the ability for 655bd8deadSopenharmony_ci textures to specify borders using glTexImage2D, but only to clamp 665bd8deadSopenharmony_ci to a constant border value set using glTexParameter and 675bd8deadSopenharmony_ci glSamplerParameter. 685bd8deadSopenharmony_ci 695bd8deadSopenharmony_ciNew Procedures and Functions 705bd8deadSopenharmony_ci 715bd8deadSopenharmony_ci void TexParameterIivEXT(enum target, enum pname, const int *params); 725bd8deadSopenharmony_ci void TexParameterIuivEXT(enum target, enum pname, const uint *params); 735bd8deadSopenharmony_ci 745bd8deadSopenharmony_ci void GetTexParameterIivEXT(enum target, enum pname, int *params); 755bd8deadSopenharmony_ci void GetTexParameterIuivEXT(enum target, enum pname, uint *params); 765bd8deadSopenharmony_ci 775bd8deadSopenharmony_ci void SamplerParameterIivEXT(uint sampler, enum pname, const int *params); 785bd8deadSopenharmony_ci void SamplerParameterIuivEXT(uint sampler, enum pname, const uint *params); 795bd8deadSopenharmony_ci 805bd8deadSopenharmony_ci void GetSamplerParameterIivEXT(uint sampler, enum pname, int *params); 815bd8deadSopenharmony_ci void GetSamplerParameterIuivEXT(uint sampler, enum pname, uint *params); 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ciNew Tokens 845bd8deadSopenharmony_ci 855bd8deadSopenharmony_ci Accepted by the <pname> parameter of TexParameteriv, TexParameterfv, 865bd8deadSopenharmony_ci SamplerParameteriv, SamplerParameterfv, TexParameterIivEXT, 875bd8deadSopenharmony_ci TexParameterIuivEXT, SamplerParameterIivEXT, SamplerParameterIuivEXT, 885bd8deadSopenharmony_ci GetTexParameteriv, GetTexParameterfv, GetTexParameterIivEXT, 895bd8deadSopenharmony_ci GetTexParameterIuivEXT, GetSamplerParameteriv, GetSamplerParameterfv, 905bd8deadSopenharmony_ci GetSamplerParameterIivEXT, and GetSamplerParameterIuivEXT: 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ci TEXTURE_BORDER_COLOR_EXT 0x1004 935bd8deadSopenharmony_ci 945bd8deadSopenharmony_ci Accepted by the <param> parameter of TexParameteri, TexParameterf, 955bd8deadSopenharmony_ci SamplerParameteri and SamplerParameterf, and by the <params> parameter of 965bd8deadSopenharmony_ci TexParameteriv, TexParameterfv, TexParameterIivEXT, TexParameterIuivEXT, 975bd8deadSopenharmony_ci SamplerParameterIivEXT, SamplerParameterIuivEXT and returned by the 985bd8deadSopenharmony_ci <params> parameter of GetTexParameteriv, GetTexParameterfv, 995bd8deadSopenharmony_ci GetTexParameterIivEXT, GetTexParameterIuivEXT, GetSamplerParameteriv, 1005bd8deadSopenharmony_ci GetSamplerParameterfv, GetSamplerParameterIivEXT, and 1015bd8deadSopenharmony_ci GetSamplerParameterIuivEXT when their <pname> parameter 1025bd8deadSopenharmony_ci is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or TEXTURE_WRAP_R: 1035bd8deadSopenharmony_ci 1045bd8deadSopenharmony_ci CLAMP_TO_BORDER_EXT 0x812D 1055bd8deadSopenharmony_ci 1065bd8deadSopenharmony_ci Note that the {Get}TexParameterI{i ui}vEXT and 1075bd8deadSopenharmony_ci {Get}SamplerParameterI{i ui}vEXT functions also accept all the 1085bd8deadSopenharmony_ci same parameters and values as are accepted by the existing 1095bd8deadSopenharmony_ci {Get}TexParameter{if}v and {Get}SamplerParameter{if}v commands, 1105bd8deadSopenharmony_ci respectively. 1115bd8deadSopenharmony_ci 1125bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL ES 3.0.2 Specification 1135bd8deadSopenharmony_ci(Rasterization) 1145bd8deadSopenharmony_ci 1155bd8deadSopenharmony_ci Modifications to Section 3.8.2 "Sampler Objects" 1165bd8deadSopenharmony_ci 1175bd8deadSopenharmony_ci Add the following to the list of SamplerParameter commands (p.123): 1185bd8deadSopenharmony_ci 1195bd8deadSopenharmony_ci void SamplerParameterI{i ui}vEXT(uint sampler, enum pname, 1205bd8deadSopenharmony_ci const T *params); 1215bd8deadSopenharmony_ci 1225bd8deadSopenharmony_ci Modify the last sentence of the description of the commands to state: 1235bd8deadSopenharmony_ci 1245bd8deadSopenharmony_ci "In the first form of the command, <param> is a value to which to 1255bd8deadSopenharmony_ci set a single-valued parameter; in the remaining forms, <params> is an 1265bd8deadSopenharmony_ci array of parameters whose type depends on the parameter being set." 1275bd8deadSopenharmony_ci 1285bd8deadSopenharmony_ci Replace the last sentence of the 3rd paragraph on p.123 (beginning with 1295bd8deadSopenharmony_ci "The values accepted in the <pname> parameter..." with the following: 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ci "<pname> must be one of the sampler state names in Table 6.10, otherwise 1325bd8deadSopenharmony_ci an INVALID_ENUM error is generated. An INVALID_ENUM error is generated 1335bd8deadSopenharmony_ci if SamplerParameter{if} is called for a non-scalar parameter 1345bd8deadSopenharmony_ci (TEXTURE_BORDER_COLOR_EXT)." 1355bd8deadSopenharmony_ci 1365bd8deadSopenharmony_ci Replace the 4th paragraph on p.123 (beginning with "Data conversions...") 1375bd8deadSopenharmony_ci with the following: 1385bd8deadSopenharmony_ci 1395bd8deadSopenharmony_ci "Data conversions are performed as specified in section 2.3.1, except 1405bd8deadSopenharmony_ci that if the values for TEXTURE_BORDER_COLOR_EXT are specified with 1415bd8deadSopenharmony_ci a call to SamplerParameterIiv or SamplerParameterIuiv, the values are 1425bd8deadSopenharmony_ci unmodified and stored with an internal data type of integer. If specified 1435bd8deadSopenharmony_ci with SamplerParameteriv, they are converted to floating point using 1445bd8deadSopenharmony_ci equation 2.2. Otherwise, border color values are unmodified and stored 1455bd8deadSopenharmony_ci as floating-point." 1465bd8deadSopenharmony_ci 1475bd8deadSopenharmony_ci Modifications to Section 3.8.6 "Compressed Texture Images" 1485bd8deadSopenharmony_ci 1495bd8deadSopenharmony_ci Add column to Table 3.16 with heading "Border Type" fill in the 1505bd8deadSopenharmony_ci values as follows: 1515bd8deadSopenharmony_ci "unorm" for the following compressed internal formats: 1525bd8deadSopenharmony_ci COMPRESSED_R11_EAC, COMPRESSED_RG11_EAC, COMPRESSED_RGB8_ETC2, 1535bd8deadSopenharmony_ci COMPRESSED_SRGB8_ETC2, COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, 1545bd8deadSopenharmony_ci COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, COMPRESSED_RGBA8_ETC2_EAC, 1555bd8deadSopenharmony_ci COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, 1565bd8deadSopenharmony_ci COMPRESSED_RGB_S3TC_DXT1_EXT, COMPRESSED_RGBA_S3TC_DXT1_EXT, 1575bd8deadSopenharmony_ci COMPRESSED_RGBA_S3TC_DXT3_EXT, COMPRESSED_RGBA_S3TC_DXT5_EXT, 1585bd8deadSopenharmony_ci COMPRESSED_RGBA_ASTC_*_KHR, COMPRESSED_SRGB8_ALPHA8_ASTC_*_KHR 1595bd8deadSopenharmony_ci "snorm" for the following compressed internal formats: 1605bd8deadSopenharmony_ci COMPRESSED_SIGNED_R11_EAC, COMPRESSED_SIGNED_RG11_EAC 1615bd8deadSopenharmony_ci "float" for the following compressed internal formats: 1625bd8deadSopenharmony_ci (currently none -- to be added by any extension adding BPTC support) 1635bd8deadSopenharmony_ci 1645bd8deadSopenharmony_ci Add the following to the table caption: 1655bd8deadSopenharmony_ci "The 'Border Type' field determines how border colors are clamped as 1665bd8deadSopenharmony_ci described in section 3.8.10." 1675bd8deadSopenharmony_ci 1685bd8deadSopenharmony_ci Modifications to Section 3.8.7 "Texture Parameters" 1695bd8deadSopenharmony_ci 1705bd8deadSopenharmony_ci Add the following to the list of TexParameter commands (p.223): 1715bd8deadSopenharmony_ci 1725bd8deadSopenharmony_ci void TexParameterI{i ui}vEXT(enum target, enum pname, 1735bd8deadSopenharmony_ci const T *params); 1745bd8deadSopenharmony_ci 1755bd8deadSopenharmony_ci 1765bd8deadSopenharmony_ci Modify the last sentence of the description of the commands to state: 1775bd8deadSopenharmony_ci 1785bd8deadSopenharmony_ci "In the first form of the command, <param> is a value to which to 1795bd8deadSopenharmony_ci set a single-valued parameter; in the remaining forms, <params> is an 1805bd8deadSopenharmony_ci array of parameters whose type depends on the parameter being set." 1815bd8deadSopenharmony_ci 1825bd8deadSopenharmony_ci Add a new paragraph at the end of p.145 after the paragraph about data 1835bd8deadSopenharmony_ci conversions: 1845bd8deadSopenharmony_ci 1855bd8deadSopenharmony_ci "In addition, if the values for TEXTURE_BORDER_COLOR_EXT are specified 1865bd8deadSopenharmony_ci with TexParameterIiv or TexParameterIuiv, the values are unmodified and 1875bd8deadSopenharmony_ci stored with an internal data type of integer or unsigned integer, 1885bd8deadSopenharmony_ci respectively. If specified with TexParameteriv, they are converted to 1895bd8deadSopenharmony_ci floating-point using equation 2.2. Otherwise, the values are unmodified 1905bd8deadSopenharmony_ci and stored as floating-point. An INVALID_ENUM error is generated if 1915bd8deadSopenharmony_ci TexParameter{if} is called for a non-scalar parameters 1925bd8deadSopenharmony_ci (TEXTURE_BORDER_COLOR_EXT)." 1935bd8deadSopenharmony_ci 1945bd8deadSopenharmony_ci Modify Table 3.17, edit the following rows (adding 1955bd8deadSopenharmony_ci CLAMP_TO_BORDER_EXT to each of the wrap modes): 1965bd8deadSopenharmony_ci 1975bd8deadSopenharmony_ci Name Type Legal Values 1985bd8deadSopenharmony_ci ============== ==== ==================== 1995bd8deadSopenharmony_ci TEXTURE_WRAP_S enum CLAMP_TO_EDGE, REPEAT, MIRRORED_REPEAT, 2005bd8deadSopenharmony_ci CLAMP_TO_BORDER_EXT 2015bd8deadSopenharmony_ci TEXTURE_WRAP_T enum CLAMP_TO_EDGE, REPEAT, MIRRORED_REPEAT, 2025bd8deadSopenharmony_ci CLAMP_TO_BORDER_EXT 2035bd8deadSopenharmony_ci TEXTURE_WRAP_R enum CLAMP_TO_EDGE, REPEAT, MIRRORED_REPEAT, 2045bd8deadSopenharmony_ci CLAMP_TO_BORDER_EXT 2055bd8deadSopenharmony_ci 2065bd8deadSopenharmony_ci and add the following row: 2075bd8deadSopenharmony_ci 2085bd8deadSopenharmony_ci Name Type Legal Values 2095bd8deadSopenharmony_ci ============== ======== ==================== 2105bd8deadSopenharmony_ci TEXTURE_BORDER_COLOR_EXT 4 floats, any 4 values 2115bd8deadSopenharmony_ci ints, or 2125bd8deadSopenharmony_ci uints 2135bd8deadSopenharmony_ci 2145bd8deadSopenharmony_ci Modifications to Section 3.8.9 "Cube Map Texture Selection" 2155bd8deadSopenharmony_ci 2165bd8deadSopenharmony_ci In the "Seamless Cube Map Filtering" subsection change the rule 2175bd8deadSopenharmony_ci about LINEAR filtering to state: 2185bd8deadSopenharmony_ci 2195bd8deadSopenharmony_ci "* If LINEAR filtering is done within a miplevel, always apply 2205bd8deadSopenharmony_ci wrap mode CLAMP_TO_BORDER_EXT. Then, ..." 2215bd8deadSopenharmony_ci 2225bd8deadSopenharmony_ci Modifications to Section 3.8.10 "Texture Minification" 2235bd8deadSopenharmony_ci 2245bd8deadSopenharmony_ci Modify Table 3.19, edit the cell that says: 2255bd8deadSopenharmony_ci "border clamping (used only for cube maps with LINEAR filter)" 2265bd8deadSopenharmony_ci and replace it with "CLAMP_TO_BORDER_EXT". 2275bd8deadSopenharmony_ci 2285bd8deadSopenharmony_ci In the subsection "Coordinate Wrapping and Texel Selection" 2295bd8deadSopenharmony_ci add the following text at the end of the description for when 2305bd8deadSopenharmony_ci TEXTURE_MIN_FILTER is NEAREST: 2315bd8deadSopenharmony_ci 2325bd8deadSopenharmony_ci "If the selected (i,j,k), (i,j) or i location refers to a border texel 2335bd8deadSopenharmony_ci that satisfies any of the conditions: 2345bd8deadSopenharmony_ci i < 0, j < 0, k < 0, i >= w_t, j >= h_t, k >= d_t 2355bd8deadSopenharmony_ci then the border values defined by TEXTURE_BORDER_COLOR_EXT are used 2365bd8deadSopenharmony_ci in place of the non-existent texel. If the texture contains color 2375bd8deadSopenharmony_ci components, the values of TEXTURE_BORDER_COLOR_EXT are interpreted 2385bd8deadSopenharmony_ci as an RGBA color to match the texture's internal format in a manner 2395bd8deadSopenharmony_ci consistent with table 3.11. The internal data type of the border 2405bd8deadSopenharmony_ci colors must be consistent with the type returned by the texture as 2415bd8deadSopenharmony_ci described in chapter 3, or the result is undefined. Border values are 2425bd8deadSopenharmony_ci clamped before they are used, according to the format in which the 2435bd8deadSopenharmony_ci texture components are stored. For signed and unsigned normalized 2445bd8deadSopenharmony_ci fixed-point formats, border values are clamped to [-1,1] and [0,1] 2455bd8deadSopenharmony_ci respectively. For floating-point and integer formats, border values 2465bd8deadSopenharmony_ci are clamped to the representable range of the format. For compressed 2475bd8deadSopenharmony_ci formats, border values are clamped as signed normalized ("snorm"), 2485bd8deadSopenharmony_ci unsigned normalized ("unorm"), or floating-point as described in 2495bd8deadSopenharmony_ci Table 3.16 for each format. If the texture contains depth components, 2505bd8deadSopenharmony_ci the first component of TEXTURE_BORDER_COLOR_EXT is interpreted as a 2515bd8deadSopenharmony_ci depth value." 2525bd8deadSopenharmony_ci 2535bd8deadSopenharmony_ci Add the following text at the end of the description for when 2545bd8deadSopenharmony_ci TEXTURE_MIN_FILTER is LINEAR: 2555bd8deadSopenharmony_ci 2565bd8deadSopenharmony_ci "For any texel in the equation above that refers to a border texel 2575bd8deadSopenharmony_ci outside the defined range of the image, the texel value is taken 2585bd8deadSopenharmony_ci from the texture border color as with NEAREST filtering." 2595bd8deadSopenharmony_ci 2605bd8deadSopenharmony_ci Modifications to Section 3.7.14 "Texture state" 2615bd8deadSopenharmony_ci 2625bd8deadSopenharmony_ci Modify the second paragraph as follows: 2635bd8deadSopenharmony_ci 2645bd8deadSopenharmony_ci "Next, there are four sets of texture properties... Each set consists 2655bd8deadSopenharmony_ci of the selected minification and magnification filters, the wrap modes 2665bd8deadSopenharmony_ci for s, t, r (three-dimensional only), the TEXTURE_BORDER_COLOR_EXT, 2675bd8deadSopenharmony_ci two floating-point numbers ... In the initial state, ... wrap modes 2685bd8deadSopenharmony_ci are set to REPEAT, and the value of TEXTURE_BORDER_COLOR_EXT is 2695bd8deadSopenharmony_ci (0,0,0,0). ..." 2705bd8deadSopenharmony_ci 2715bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL ES 3.0.2 Specification 2725bd8deadSopenharmony_ci(State and State Requests) 2735bd8deadSopenharmony_ci 2745bd8deadSopenharmony_ci Modifications to Section 6.1.3 "Enumerated Queries" 2755bd8deadSopenharmony_ci 2765bd8deadSopenharmony_ci Add the following command in a list with GetTexParameter{if}v: 2775bd8deadSopenharmony_ci 2785bd8deadSopenharmony_ci void GetTexParameterI{i ui}v(enum target, enum pname, T *data); 2795bd8deadSopenharmony_ci 2805bd8deadSopenharmony_ci Append the following to the description of the GetTexParameter* commands: 2815bd8deadSopenharmony_ci 2825bd8deadSopenharmony_ci "Querying <pname> TEXTURE_BORDER_COLOR_EXT with GetTexParameterIiv or 2835bd8deadSopenharmony_ci GetTexParameterIuiv returns the border color values as signed integers 2845bd8deadSopenharmony_ci or unsigned integers, respectively; otherwise the values are returned 2855bd8deadSopenharmony_ci as described in section 6.1.2. If the border color is queried with a 2865bd8deadSopenharmony_ci type that does not match the original type with which it was specified, 2875bd8deadSopenharmony_ci the result is undefined." 2885bd8deadSopenharmony_ci 2895bd8deadSopenharmony_ci Modifications to Section 6.1.5 "Sampler Queries" 2905bd8deadSopenharmony_ci 2915bd8deadSopenharmony_ci Add the following command in a list with GetSamplerParameter{if}v: 2925bd8deadSopenharmony_ci 2935bd8deadSopenharmony_ci void GetSamplerParameterI{i ui}v(uint sampler, enum pname, T *params); 2945bd8deadSopenharmony_ci 2955bd8deadSopenharmony_ci Append the following to the description of the GetSamplerParameter* 2965bd8deadSopenharmony_ci commands: 2975bd8deadSopenharmony_ci 2985bd8deadSopenharmony_ci "Querying TEXTURE_BORDER_COLOR_EXT with GetSamplerParameterIiv or 2995bd8deadSopenharmony_ci GetSamplerParameterIuiv returns the border color values as signed integers 3005bd8deadSopenharmony_ci or unsigned integers, respectively; otherwise the values are returned 3015bd8deadSopenharmony_ci as described in section 6.1.2. If the border color is queried with a 3025bd8deadSopenharmony_ci type that does not match the original type with which it was specified, 3035bd8deadSopenharmony_ci the result is undefined." 3045bd8deadSopenharmony_ci 3055bd8deadSopenharmony_ciErrors 3065bd8deadSopenharmony_ci 3075bd8deadSopenharmony_ci An INVALID_ENUM error is generated if TexParameter{if} is called for 3085bd8deadSopenharmony_ci a non-scalar parameter (TEXTURE_BORDER_COLOR_EXT). 3095bd8deadSopenharmony_ci 3105bd8deadSopenharmony_ci An INVALID_ENUM error is generated by TexParameterI*v if 3115bd8deadSopenharmony_ci <target> is not one of the valid types of texture targets accepted 3125bd8deadSopenharmony_ci by TexParameter{if}v. 3135bd8deadSopenharmony_ci 3145bd8deadSopenharmony_ci An INVALID_ENUM error is generated by TexParameterI*v if <pname> 3155bd8deadSopenharmony_ci is not one of the values listed in Table 3.17. 3165bd8deadSopenharmony_ci 3175bd8deadSopenharmony_ci An INVALID_ENUM error is generated by TexParameterI*v if the type 3185bd8deadSopenharmony_ci of the parameter specified by <pname> is enum, and the value(s) 3195bd8deadSopenharmony_ci specified by <params> is not among the legal values shown in 3205bd8deadSopenharmony_ci Table 3.17. 3215bd8deadSopenharmony_ci 3225bd8deadSopenharmony_ci An INVALID_ENUM error is generated by GetTexParameterI*v if 3235bd8deadSopenharmony_ci <target> is not one of the valid types of texture targets accepted 3245bd8deadSopenharmony_ci by GetTexParameter{if}v. 3255bd8deadSopenharmony_ci 3265bd8deadSopenharmony_ci An INVALID_ENUM error is generated by GetTexParameterI*v if 3275bd8deadSopenharmony_ci <pname> is not one of values accepted by GetTexParameter{if}v. 3285bd8deadSopenharmony_ci 3295bd8deadSopenharmony_ci An INVALID_ENUM error is generated if SamplerParameter{if} is called 3305bd8deadSopenharmony_ci for a non-scalar parameter (TEXTURE_BORDER_COLOR_EXT). 3315bd8deadSopenharmony_ci 3325bd8deadSopenharmony_ci An INVALID_OPERATION error is generated by SamplerParameterI*v 3335bd8deadSopenharmony_ci if <sampler> is not the name of a sampler object previously returned 3345bd8deadSopenharmony_ci from a call to GenSamplers. 3355bd8deadSopenharmony_ci 3365bd8deadSopenharmony_ci An INVALID_ENUM error is generated by SamplerParameterI*v if 3375bd8deadSopenharmony_ci <pname> is not the name of a parameter accepted by SamplerParameter*. 3385bd8deadSopenharmony_ci 3395bd8deadSopenharmony_ci An INVALID_OPERATION error is generated by GetSamplerParameterI*v 3405bd8deadSopenharmony_ci if <sampler> is not the name of a sampler object previously returned 3415bd8deadSopenharmony_ci from a call to GenSamplers. 3425bd8deadSopenharmony_ci 3435bd8deadSopenharmony_ci An INVALID_ENUM error is generated by GetSamplerParameterI*v if 3445bd8deadSopenharmony_ci <pname> is not the name of a parameter accepted by GetSamplerParameter*. 3455bd8deadSopenharmony_ci 3465bd8deadSopenharmony_ci 3475bd8deadSopenharmony_ciNew State 3485bd8deadSopenharmony_ci 3495bd8deadSopenharmony_ci Modify table 6.10: 3505bd8deadSopenharmony_ci 3515bd8deadSopenharmony_ci Change the type information changes for these parameters. 3525bd8deadSopenharmony_ci Initial 3535bd8deadSopenharmony_ci Get Value Type Get Command Value Description Sec. 3545bd8deadSopenharmony_ci --------- ------ ----------- ------- ----------- ---- 3555bd8deadSopenharmony_ci TEXTURE_WRAP_S n x Z4 GetSamplerParameter (as before...) 3565bd8deadSopenharmony_ci TEXTURE_WRAP_T n x Z4 GetSamplerParameter (as before...) 3575bd8deadSopenharmony_ci TEXTURE_WRAP_R n x Z4 GetSamplerParameter (as before...) 3585bd8deadSopenharmony_ci 3595bd8deadSopenharmony_ci Add the following parameter: 3605bd8deadSopenharmony_ci 3615bd8deadSopenharmony_ci Get Value Type Get Command Value Description Sec. 3625bd8deadSopenharmony_ci --------- ------ ----------- ------- ----------- ---- 3635bd8deadSopenharmony_ci TEXTURE_BORDER_COLOR_EXT 4 x C GetSamplerParameter 0.0,0.0,0.0,0.0 border color 3.8 3645bd8deadSopenharmony_ci 3655bd8deadSopenharmony_ci 3665bd8deadSopenharmony_ciDependencies on OpenGL ES 3.0 3675bd8deadSopenharmony_ci 3685bd8deadSopenharmony_ci If OpenGL ES 3.0 is not supported, but OES_texture_3D is supported, 3695bd8deadSopenharmony_ci replace references to TEXTURE_WRAP_R with TEXTURE_WRAP_R_OES. 3705bd8deadSopenharmony_ci 3715bd8deadSopenharmony_ci If OpenGL ES 3.0 is not supported, delete all references to the 3725bd8deadSopenharmony_ci TexParameterI*, GetTexParameterI*, SamplerParameterI*, and 3735bd8deadSopenharmony_ci GetSamplerParameterI* entry points and all related text about 3745bd8deadSopenharmony_ci signed and unsigned integer textures. 3755bd8deadSopenharmony_ci 3765bd8deadSopenharmony_ciDependencies on OES_texture_3D 3775bd8deadSopenharmony_ci 3785bd8deadSopenharmony_ci If neither OpenGL ES 3.0 nor OES_texture_3D is supported, ignore all 3795bd8deadSopenharmony_ci references to three-dimensional textures and the token TEXTURE_WRAP_R 3805bd8deadSopenharmony_ci as well as any reference to r wrap modes. References to (i,j,k), k, 3815bd8deadSopenharmony_ci and d_t in section 3.8.10 should also be removed. 3825bd8deadSopenharmony_ci 3835bd8deadSopenharmony_ciDependencies on EXT_texture_compression_s3tc 3845bd8deadSopenharmony_ci 3855bd8deadSopenharmony_ci If EXT_texture_compression is not supported, ignore all references to 3865bd8deadSopenharmony_ci S3TC compressed textures. 3875bd8deadSopenharmony_ci 3885bd8deadSopenharmony_ciDependencies on KHR_texture_compression_astc_{ldr,hdr} 3895bd8deadSopenharmony_ci 3905bd8deadSopenharmony_ci If none of the KHR_texture_compression_astc extensions are supported, 3915bd8deadSopenharmony_ci ignore all references to ASTC compressed textures. 3925bd8deadSopenharmony_ci 3935bd8deadSopenharmony_ciIssues 3945bd8deadSopenharmony_ci 3955bd8deadSopenharmony_ci (1) Which is the correct equation to use for converting 3965bd8deadSopenharmony_ci TEXTURE_BORDER_COLOR_EXT when specified via SamplerParameteriv 3975bd8deadSopenharmony_ci or TexParameteriv? 3985bd8deadSopenharmony_ci 3995bd8deadSopenharmony_ci RESOLVED: Early versions of GL 4.4 referenced both equations 2.1 and 2.2. 4005bd8deadSopenharmony_ci As per clarification in Bug 11185, the correct answer is equation 2.2. 4015bd8deadSopenharmony_ci 4025bd8deadSopenharmony_ci (2) Does SamplerParmeter{if} set an error if called with 4035bd8deadSopenharmony_ci a non-scalar parameter? 4045bd8deadSopenharmony_ci 4055bd8deadSopenharmony_ci RESOLVED: Yes. This should be analogous to TexParameteriv. 4065bd8deadSopenharmony_ci This error seems to be missing from GL 4.4. Filed bug 11186 4075bd8deadSopenharmony_ci to get this rectified. 4085bd8deadSopenharmony_ci 4095bd8deadSopenharmony_ci (3) Should the second argument to GetTexParameterI* be <value> or <pname>? 4105bd8deadSopenharmony_ci 4115bd8deadSopenharmony_ci RESOLVED: the GL specs call it <value>, but the headers call it <pname>. 4125bd8deadSopenharmony_ci The GetSamplerParameterI* version calls it <pname>, so we are doing the 4135bd8deadSopenharmony_ci same here for consistency. This was corrected in OpenGL ES 3.1. 4145bd8deadSopenharmony_ci 4155bd8deadSopenharmony_ciRevision History 4165bd8deadSopenharmony_ci 4175bd8deadSopenharmony_ci Rev. Date Author Changes 4185bd8deadSopenharmony_ci ---- ---------- --------- ------------------------------------- 4195bd8deadSopenharmony_ci 6 23-04-2014 dkoch Fix various typos (Bug 12132). 4205bd8deadSopenharmony_ci 5 13-03-2014 dkoch Update contributors. 4215bd8deadSopenharmony_ci 4 10-03-2014 Jon Leech Change suffix to EXT. 4225bd8deadSopenharmony_ci 3 13-01-2014 dkoch Fixed a number of types. Issue 3. 4235bd8deadSopenharmony_ci 2 07-11-2013 dkoch Resolved issue 1. Corrected equation. 4245bd8deadSopenharmony_ci 1 04-11-2013 dkoch Initial draft based on NV_texture_border_clamp 4255bd8deadSopenharmony_ci and OpenGL 4.4. 426