15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    OES_texture_cube_map
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_OES_texture_cube_map
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Benj Lipchak (benj.lipchak 'at' amd.com)
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciNotice
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    Copyright (c) 2007-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 ES 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    Ratified by the Khronos BOP
315bd8deadSopenharmony_ci
325bd8deadSopenharmony_ciVersion
335bd8deadSopenharmony_ci
345bd8deadSopenharmony_ci    Version 2, April 16, 2015
355bd8deadSopenharmony_ci
365bd8deadSopenharmony_ciNumber
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ci    OpenGL ES Extension #20
395bd8deadSopenharmony_ci
405bd8deadSopenharmony_ciDependencies
415bd8deadSopenharmony_ci
425bd8deadSopenharmony_ci    OpenGL ES 1.0 is required.
435bd8deadSopenharmony_ci
445bd8deadSopenharmony_ci    This extension is based on the ARB_texture_cube_map extension specification.
455bd8deadSopenharmony_ci
465bd8deadSopenharmony_ciOverview
475bd8deadSopenharmony_ci
485bd8deadSopenharmony_ci    This extension provides a new texture generation scheme for cube
495bd8deadSopenharmony_ci    map textures.  Instead of the current texture providing a 1D, 2D,
505bd8deadSopenharmony_ci    or 3D lookup into a 1D, 2D, or 3D texture image, the texture is a
515bd8deadSopenharmony_ci    set of six 2D images representing the faces of a cube.  The (s,t,r)
525bd8deadSopenharmony_ci    texture coordinates are treated as a direction vector emanating from
535bd8deadSopenharmony_ci    the center of a cube.  At texture generation time, the interpolated
545bd8deadSopenharmony_ci    per-fragment (s,t,r) selects one cube face 2D image based on the
555bd8deadSopenharmony_ci    largest magnitude coordinate (the major axis).  A new 2D (s,t) is
565bd8deadSopenharmony_ci    calculated by dividing the two other coordinates (the minor axes
575bd8deadSopenharmony_ci    values) by the major axis value.  Then the new (s,t) is used to
585bd8deadSopenharmony_ci    lookup into the selected 2D texture image face of the cube map.
595bd8deadSopenharmony_ci
605bd8deadSopenharmony_ci    Unlike a standard 1D, 2D, or 3D texture that have just one target,
615bd8deadSopenharmony_ci    a cube map texture has six targets, one for each of its six 2D texture
625bd8deadSopenharmony_ci    image cube faces.  All these targets must be consistent, complete,
635bd8deadSopenharmony_ci    and have equal width and height (ie, square dimensions).
645bd8deadSopenharmony_ci
655bd8deadSopenharmony_ci    This extension also provides two new texture coordinate generation modes
665bd8deadSopenharmony_ci    for use in conjunction with cube map texturing.  The reflection map
675bd8deadSopenharmony_ci    mode generates texture coordinates (s,t,r) matching the vertex's
685bd8deadSopenharmony_ci    eye-space reflection vector.  The reflection map mode
695bd8deadSopenharmony_ci    is useful for environment mapping without the singularity inherent
705bd8deadSopenharmony_ci    in sphere mapping.  The normal map mode generates texture coordinates
715bd8deadSopenharmony_ci    (s,t,r) matching the vertex's transformed eye-space
725bd8deadSopenharmony_ci    normal.  The normal map mode is useful for sophisticated cube
735bd8deadSopenharmony_ci    map texturing-based diffuse lighting models.
745bd8deadSopenharmony_ci
755bd8deadSopenharmony_ci    The intent of the new texgen functionality is that an application using
765bd8deadSopenharmony_ci    cube map texturing can use the new texgen modes to automatically
775bd8deadSopenharmony_ci    generate the reflection or normal vectors used to look up into the
785bd8deadSopenharmony_ci    cube map texture.
795bd8deadSopenharmony_ci
805bd8deadSopenharmony_ci    An application note:  When using cube mapping with dynamic cube
815bd8deadSopenharmony_ci    maps (meaning the cube map texture is re-rendered every frame),
825bd8deadSopenharmony_ci    by keeping the cube map's orientation pointing at the eye position,
835bd8deadSopenharmony_ci    the texgen-computed reflection or normal vector texture coordinates
845bd8deadSopenharmony_ci    can be always properly oriented for the cube map.  However if the
855bd8deadSopenharmony_ci    cube map is static (meaning that when view changes, the cube map
865bd8deadSopenharmony_ci    texture is not updated), the texture matrix must be used to rotate
875bd8deadSopenharmony_ci    the texgen-computed reflection or normal vector texture coordinates
885bd8deadSopenharmony_ci    to match the orientation of the cube map.  The rotation can be
895bd8deadSopenharmony_ci    computed based on two vectors: 1) the direction vector from the cube
905bd8deadSopenharmony_ci    map center to the eye position (both in world coordinates), and 2)
915bd8deadSopenharmony_ci    the cube map orientation in world coordinates.  The axis of rotation
925bd8deadSopenharmony_ci    is the cross product of these two vectors; the angle of rotation is
935bd8deadSopenharmony_ci    the arcsin of the dot product of these two vectors.
945bd8deadSopenharmony_ci
955bd8deadSopenharmony_ciIssues
965bd8deadSopenharmony_ci
975bd8deadSopenharmony_ci    Please refer to the ARB_texture_cube_map extension specification.
985bd8deadSopenharmony_ci
995bd8deadSopenharmony_ciNew Procedures and Functions
1005bd8deadSopenharmony_ci
1015bd8deadSopenharmony_ci        void glTexGenfOES(GLenum coord, GLenum pname, GLfloat param);
1025bd8deadSopenharmony_ci        void glTexGenfvOES(GLenum coord, GLenum pname, const GLfloat *params);
1035bd8deadSopenharmony_ci        void glTexGeniOES(GLenum coord, GLenum pname, GLint param);
1045bd8deadSopenharmony_ci        void glTexGenivOES(GLenum coord, GLenum pname, const GLint *params);
1055bd8deadSopenharmony_ci        void glTexGenxOES(GLenum coord, GLenum pname, GLfixed param);
1065bd8deadSopenharmony_ci        void glTexGenxvOES(GLenum coord, GLenum pname, const GLfixed *params);
1075bd8deadSopenharmony_ci
1085bd8deadSopenharmony_ci        void glGetTexGenfvOES(GLenum coord, GLenum pname, GLfloat *params);
1095bd8deadSopenharmony_ci        void glGetTexGenivOES(GLenum coord, GLenum pname, GLint *params);
1105bd8deadSopenharmony_ci        void glGetTexGenxvOES(GLenum coord, GLenum pname, GLfixed *params);
1115bd8deadSopenharmony_ci
1125bd8deadSopenharmony_ciNew Tokens
1135bd8deadSopenharmony_ci
1145bd8deadSopenharmony_ci    Accepted by the <pname> parameter of TexGenfOES, TexGeniOES, TexGenxOES,
1155bd8deadSopenharmony_ci    TexGenfvOES, TexGenivOES, TexGenxvOES, GetTexGenfvOES, GetTexGenivOES, and
1165bd8deadSopenharmony_ci    GetTexGenxvOES:
1175bd8deadSopenharmony_ci
1185bd8deadSopenharmony_ci        TEXTURE_GEN_MODE_OES                0x2500
1195bd8deadSopenharmony_ci
1205bd8deadSopenharmony_ci    Accepted by the <params> parameter of TexGenfOES, TexGeniOES, TexGenxOES,
1215bd8deadSopenharmony_ci    TexGenfvOES, TexGenivOES, and TexGenxvOES when <pname> parameter is
1225bd8deadSopenharmony_ci    TEXTURE_GEN_MODE_OES:
1235bd8deadSopenharmony_ci
1245bd8deadSopenharmony_ci        NORMAL_MAP_OES                      0x8511
1255bd8deadSopenharmony_ci        REFLECTION_MAP_OES                  0x8512
1265bd8deadSopenharmony_ci
1275bd8deadSopenharmony_ci    Accepted by the <cap> parameter of Enable, Disable, IsEnabled, by the
1285bd8deadSopenharmony_ci    <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetFixedv, and
1295bd8deadSopenharmony_ci    by the <target> parameter of BindTexture, GetTexParameterfv, 
1305bd8deadSopenharmony_ci    GetTexParameteriv, GetTexParameterxv, TexParameterf, TexParameteri,
1315bd8deadSopenharmony_ci    TexParameterx, TexParameterfv, TexParameteriv, and TexParameterxv:
1325bd8deadSopenharmony_ci
1335bd8deadSopenharmony_ci        TEXTURE_CUBE_MAP_OES                0x8513
1345bd8deadSopenharmony_ci
1355bd8deadSopenharmony_ci    Accepted by the <cap> parameter of Enable, Disable, IsEnabled, by the
1365bd8deadSopenharmony_ci    <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetFixedv, and
1375bd8deadSopenharmony_ci    by the <coord> parameter of TexGenfOES, TexGeniOES, TexGenxOES, TexGenfvOES, 
1385bd8deadSopenharmony_ci    TexGenivOES, TexGenxvOES, GetTexGenfvOES, GetTexGenivOES, and
1395bd8deadSopenharmony_ci    GetTexGenxvOES:
1405bd8deadSopenharmony_ci
1415bd8deadSopenharmony_ci        TEXTURE_GEN_STR_OES                 0x8D60
1425bd8deadSopenharmony_ci
1435bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
1445bd8deadSopenharmony_ci    GetFloatv, and GetDoublev:
1455bd8deadSopenharmony_ci
1465bd8deadSopenharmony_ci        TEXTURE_BINDING_CUBE_MAP_OES        0x8514
1475bd8deadSopenharmony_ci
1485bd8deadSopenharmony_ci    Accepted by the <target> parameter of TexImage2D, CopyTexImage2D, 
1495bd8deadSopenharmony_ci    TexSubImage2D, and CopySubTexImage2D:
1505bd8deadSopenharmony_ci
1515bd8deadSopenharmony_ci        TEXTURE_CUBE_MAP_POSITIVE_X_OES     0x8515
1525bd8deadSopenharmony_ci        TEXTURE_CUBE_MAP_NEGATIVE_X_OES     0x8516
1535bd8deadSopenharmony_ci        TEXTURE_CUBE_MAP_POSITIVE_Y_OES     0x8517
1545bd8deadSopenharmony_ci        TEXTURE_CUBE_MAP_NEGATIVE_Y_OES     0x8518
1555bd8deadSopenharmony_ci        TEXTURE_CUBE_MAP_POSITIVE_Z_OES     0x8519
1565bd8deadSopenharmony_ci        TEXTURE_CUBE_MAP_NEGATIVE_Z_OES     0x851A
1575bd8deadSopenharmony_ci
1585bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetBooleanv, GetDoublev,
1595bd8deadSopenharmony_ci    GetIntegerv, and GetFloatv:
1605bd8deadSopenharmony_ci
1615bd8deadSopenharmony_ci        MAX_CUBE_MAP_TEXTURE_SIZE_OES       0x851C
1625bd8deadSopenharmony_ci
1635bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 1.5 Specification (OpenGL Operation)
1645bd8deadSopenharmony_ci
1655bd8deadSopenharmony_ci --  Section 2.11.4 "Generating Texture Coordinates"
1665bd8deadSopenharmony_ci
1675bd8deadSopenharmony_ci      Change the last sentence in the 1st paragraph (page 37) to:
1685bd8deadSopenharmony_ci
1695bd8deadSopenharmony_ci      "If <pname> is TEXTURE_GEN_MODE_OES, then either <params> points to
1705bd8deadSopenharmony_ci      or <param> is an integer that is one of the symbolic constants
1715bd8deadSopenharmony_ci      REFLECTION_MAP_OES, or NORMAL_MAP_OES."  OBJECT_LINEAR, EYE_LINEAR, 
1725bd8deadSopenharmony_ci      and SPHERE_MAP texture coordinate generation modes are not supported.
1735bd8deadSopenharmony_ci
1745bd8deadSopenharmony_ci      Add these paragraphs after the 4th paragraph (page 38):
1755bd8deadSopenharmony_ci
1765bd8deadSopenharmony_ci      "If TEXTURE_GEN_MODE_OES indicates REFLECTION_MAP_OES, compute the
1775bd8deadSopenharmony_ci      reflection vector r as described for the SPHERE_MAP mode.  Then the
1785bd8deadSopenharmony_ci      value assigned to an s coordinate is s = rx; the value assigned to a t
1795bd8deadSopenharmony_ci      coordinate is t = ry; and the value assigned to a r coordinate is r = rz.
1805bd8deadSopenharmony_ci
1815bd8deadSopenharmony_ci      If TEXTURE_GEN_MODE_OES indicates NORMAL_MAP_OES, compute the normal
1825bd8deadSopenharmony_ci      vector nf as described in section 2.10.3.  Then the value assigned
1835bd8deadSopenharmony_ci      to an s coordinate is s = nfx; the value assigned to a t coordinate is
1845bd8deadSopenharmony_ci      t = nfy; and the value assigned to a r coordinate is r = nfz.  (The values
1855bd8deadSopenharmony_ci      nfx, nfy, and nfz are the components of nf.)
1865bd8deadSopenharmony_ci
1875bd8deadSopenharmony_ci      A texture coordinate generation function is enabled or disabled
1885bd8deadSopenharmony_ci      using Enable and Disable with an argument of TEXTURE_GEN_STR_OES.  
1895bd8deadSopenharmony_ci      TEXTURE_GEN_S, TEXTURE_GEN_T, TEXTURE_GEN_R and TEXTURE_GEN_Q
1905bd8deadSopenharmony_ci      argument values to Enable and Disable are not supported.
1915bd8deadSopenharmony_ci
1925bd8deadSopenharmony_ci      The last paragraph's last sentence (page 38) should be changed to:
1935bd8deadSopenharmony_ci
1945bd8deadSopenharmony_ci      "Initially all texture generation modes are set to REFLECTION_MAP_OES"
1955bd8deadSopenharmony_ci
1965bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.5 Specification (Rasterization)
1975bd8deadSopenharmony_ci
1985bd8deadSopenharmony_ci --  Section 3.8.1 "Texture Image Specification"
1995bd8deadSopenharmony_ci
2005bd8deadSopenharmony_ci     Change the second and third to last sentences on page 116 to:
2015bd8deadSopenharmony_ci
2025bd8deadSopenharmony_ci     "<target> must be one of TEXTURE_2D for a 2D texture, or one of
2035bd8deadSopenharmony_ci     TEXTURE_CUBE_MAP_POSITIVE_X_OES, TEXTURE_CUBE_MAP_NEGATIVE_X_OES,
2045bd8deadSopenharmony_ci     TEXTURE_CUBE_MAP_POSITIVE_Y_OES, TEXTURE_CUBE_MAP_NEGATIVE_Y_OES,
2055bd8deadSopenharmony_ci     TEXTURE_CUBE_MAP_POSITIVE_Z_OES, or TEXTURE_CUBE_MAP_NEGATIVE_Z_OES
2065bd8deadSopenharmony_ci     for a cube map texture."
2075bd8deadSopenharmony_ci
2085bd8deadSopenharmony_ci     Add the following paragraphs after the first paragraph on page 117:
2095bd8deadSopenharmony_ci
2105bd8deadSopenharmony_ci     "A 2D texture consists of a single 2D texture image.  A cube
2115bd8deadSopenharmony_ci     map texture is a set of six 2D texture images.  The six cube map
2125bd8deadSopenharmony_ci     texture targets form a single cube map texture though each target
2135bd8deadSopenharmony_ci     names a distinct face of the cube map.  The TEXTURE_CUBE_MAP_*_OES
2145bd8deadSopenharmony_ci     targets listed above update their appropriate cube map face 2D
2155bd8deadSopenharmony_ci     texture image.  Note that the six cube map 2D image tokens such as
2165bd8deadSopenharmony_ci     TEXTURE_CUBE_MAP_POSITIVE_X_OES are used when specifying, updating,
2175bd8deadSopenharmony_ci     or querying one of a cube map's six 2D image, but when enabling
2185bd8deadSopenharmony_ci     cube map texturing or binding to a cube map texture object (that is
2195bd8deadSopenharmony_ci     when the cube map is accessed as a whole as opposed to a particular
2205bd8deadSopenharmony_ci     2D image), the TEXTURE_CUBE_MAP_OES target is specified.
2215bd8deadSopenharmony_ci
2225bd8deadSopenharmony_ci     When the target parameter to TexImage2D is one of the six cube map
2235bd8deadSopenharmony_ci     2D image targets, the error INVALID_VALUE is generated if the width
2245bd8deadSopenharmony_ci     and height parameters are not equal.
2255bd8deadSopenharmony_ci
2265bd8deadSopenharmony_ci     If cube map texturing is enabled at the time a primitive is
2275bd8deadSopenharmony_ci     rasterized and if the set of six targets are not "cube complete",
2285bd8deadSopenharmony_ci     then it is as if texture mapping were disabled.  The targets of
2295bd8deadSopenharmony_ci     a cube map texture are "cube complete" if the array 0 of all six
2305bd8deadSopenharmony_ci     targets have identical, positive, and square dimensions, the array
2315bd8deadSopenharmony_ci     0 of all six targets were specified with the same internalformat,
2325bd8deadSopenharmony_ci     and the array 0 of all six targets have the same border width."
2335bd8deadSopenharmony_ci
2345bd8deadSopenharmony_ci     After the 14th paragraph (page 116) add:
2355bd8deadSopenharmony_ci
2365bd8deadSopenharmony_ci     "In a similiar fashion, the maximum allowable width and height
2375bd8deadSopenharmony_ci     (they must be the same) of a cube map texture must be at least
2385bd8deadSopenharmony_ci     2^(k-lod) for image arrays level 0 through k, where k is the
2395bd8deadSopenharmony_ci     log base 2 of MAX_CUBE_MAP_TEXTURE_SIZE_OES."
2405bd8deadSopenharmony_ci
2415bd8deadSopenharmony_ci --  Section 3.8.2 "Alternate Texture Image Specification Commands"
2425bd8deadSopenharmony_ci
2435bd8deadSopenharmony_ci     Update the second paragraph (page 120) to say:
2445bd8deadSopenharmony_ci
2455bd8deadSopenharmony_ci     ... "Currently, <target> must be
2465bd8deadSopenharmony_ci     TEXTURE_2D, TEXTURE_CUBE_MAP_POSITIVE_X_OES,
2475bd8deadSopenharmony_ci     TEXTURE_CUBE_MAP_NEGATIVE_X_OES, TEXTURE_CUBE_MAP_POSITIVE_Y_OES,
2485bd8deadSopenharmony_ci     TEXTURE_CUBE_MAP_NEGATIVE_Y_OES, TEXTURE_CUBE_MAP_POSITIVE_Z_OES,
2495bd8deadSopenharmony_ci     or TEXTURE_CUBE_MAP_NEGATIVE_Z_OES." ...
2505bd8deadSopenharmony_ci
2515bd8deadSopenharmony_ci     Add after the second paragraph (page 120), the following:
2525bd8deadSopenharmony_ci
2535bd8deadSopenharmony_ci     "When the target parameter to CopyTexImage2D is one of the six cube
2545bd8deadSopenharmony_ci     map 2D image targets, the error INVALID_VALUE is generated if the
2555bd8deadSopenharmony_ci     width and height parameters are not equal."
2565bd8deadSopenharmony_ci
2575bd8deadSopenharmony_ci --  Section 3.8.3 "Texture Parameters"
2585bd8deadSopenharmony_ci
2595bd8deadSopenharmony_ci     Change paragraph one (page 124) to say:
2605bd8deadSopenharmony_ci
2615bd8deadSopenharmony_ci     ... "<target> is the target, either TEXTURE_2D or TEXTURE_CUBE_MAP_OES."
2625bd8deadSopenharmony_ci
2635bd8deadSopenharmony_ci     Add a final paragraph saying:
2645bd8deadSopenharmony_ci
2655bd8deadSopenharmony_ci     "Texture parameters for a cube map texture apply to cube map
2665bd8deadSopenharmony_ci     as a whole; the six distinct 2D texture images use the
2675bd8deadSopenharmony_ci     texture parameters of the cube map itself.
2685bd8deadSopenharmony_ci
2695bd8deadSopenharmony_ci --  Section 3.8.5 "Texture Minification" under "Mipmapping"
2705bd8deadSopenharmony_ci
2715bd8deadSopenharmony_ci     Change the first full paragraph on page 130 to:
2725bd8deadSopenharmony_ci
2735bd8deadSopenharmony_ci     ... "If texturing is enabled for two-dimensional texturing but not cube map
2745bd8deadSopenharmony_ci     texturing (and TEXTURE_MIN_FILTER is one that requires a mipmap) at the
2755bd8deadSopenharmony_ci     time a primitive is rasterized and if the set of arrays
2765bd8deadSopenharmony_ci     TEXTURE_BASE_LEVEL through q = min{p,TEXTURE_MAX_LEVEL} is incomplete,
2775bd8deadSopenharmony_ci     based on the dimensions of array 0, then it is as if texture mapping were
2785bd8deadSopenharmony_ci     disabled."
2795bd8deadSopenharmony_ci
2805bd8deadSopenharmony_ci     Follow the first full paragraph on page 130 with:
2815bd8deadSopenharmony_ci
2825bd8deadSopenharmony_ci     "If cube map texturing is enabled and TEXTURE_MIN_FILTER is one that
2835bd8deadSopenharmony_ci     requires mipmap levels at the time a primitive is rasterized and
2845bd8deadSopenharmony_ci     if the set of six targets are not "mipmap cube complete", then it
2855bd8deadSopenharmony_ci     is as if texture mapping were disabled.  The targets of a cube map
2865bd8deadSopenharmony_ci     texture are "mipmap cube complete" if the six cube map targets are
2875bd8deadSopenharmony_ci     "cube complete" and the set of arrays TEXTURE_BASE_LEVEL through
2885bd8deadSopenharmony_ci     q are not incomplete (as described above)."
2895bd8deadSopenharmony_ci
2905bd8deadSopenharmony_ci --  Section 3.8.7 "Texture State and Proxy State"
2915bd8deadSopenharmony_ci
2925bd8deadSopenharmony_ci     Change the first sentence of the first paragraph (page 131) to say:
2935bd8deadSopenharmony_ci
2945bd8deadSopenharmony_ci     "The state necessary for texture can be divided into two categories.
2955bd8deadSopenharmony_ci     First, there are the nine sets of mipmap arrays (one each for the
2965bd8deadSopenharmony_ci     one-, two-, and three-dimensional texture targets and six for the
2975bd8deadSopenharmony_ci     cube map texture targets) and their number." ...
2985bd8deadSopenharmony_ci
2995bd8deadSopenharmony_ci     Change the second paragraph (page 132) to say:
3005bd8deadSopenharmony_ci
3015bd8deadSopenharmony_ci     "In addition to the one-, two-, three-dimensional, and the six cube
3025bd8deadSopenharmony_ci     map sets of image arrays, the partially instantiated one-, two-,
3035bd8deadSopenharmony_ci     and three-dimensional and one cube map sets of proxy image arrays
3045bd8deadSopenharmony_ci     are maintained." ...
3055bd8deadSopenharmony_ci
3065bd8deadSopenharmony_ci --  Section 3.8.8 "Texture Objects"
3075bd8deadSopenharmony_ci
3085bd8deadSopenharmony_ci     Change the first sentence of the first paragraph (page 132) to say:
3095bd8deadSopenharmony_ci
3105bd8deadSopenharmony_ci     "In addition to the default textures TEXTURE_2D and TEXTURE_CUBE_MAP_OES,
3115bd8deadSopenharmony_ci     named two-dimensional texture objects and cube map texture objects can be
3125bd8deadSopenharmony_ci     created and operated on." ...
3135bd8deadSopenharmony_ci
3145bd8deadSopenharmony_ci     Change the second paragraph (page 132) to say:
3155bd8deadSopenharmony_ci
3165bd8deadSopenharmony_ci     "A texture object is created by binding an unused name to
3175bd8deadSopenharmony_ci     TEXTURE_2D or TEXTURE_CUBE_MAP_OES." ...
3185bd8deadSopenharmony_ci     "If the new texture object is bound to TEXTURE_2D or TEXTURE_CUBE_MAP_OES,
3195bd8deadSopenharmony_ci     it remains a two-dimensional or cube map texture until it is deleted."
3205bd8deadSopenharmony_ci
3215bd8deadSopenharmony_ci     Change the third paragraph (page 133) to say:
3225bd8deadSopenharmony_ci
3235bd8deadSopenharmony_ci     "BindTexture may also be used to bind an existing texture object to
3245bd8deadSopenharmony_ci     either TEXTURE_2D or TEXTURE_CUBE_MAP_OES."
3255bd8deadSopenharmony_ci
3265bd8deadSopenharmony_ci     Change paragraph five (page 133) to say:
3275bd8deadSopenharmony_ci
3285bd8deadSopenharmony_ci     "In the initial state, TEXTURE_2D and TEXTURE_CUBE_MAP_OES have two-
3295bd8deadSopenharmony_ci     dimensional and cube map state vectors associated with them respectively."
3305bd8deadSopenharmony_ci     ...  "The initial two-dimensional and cube map texture is therefore
3315bd8deadSopenharmony_ci     operated upon, queried, and applied as TEXTUER_2D and TEXTURE_CUBE_MAP_OES
3325bd8deadSopenharmony_ci     respectively while 0 is bound to the corresponding targets."
3335bd8deadSopenharmony_ci
3345bd8deadSopenharmony_ci     Change paragraph six (page 133) to say:
3355bd8deadSopenharmony_ci
3365bd8deadSopenharmony_ci     ... "If a texture that is currently bound to one of the targets TEXTURE_2D
3375bd8deadSopenharmony_ci     or TEXTURE_CUBE_MAP_OES is deleted, it is as though BindTexture has been
3385bd8deadSopenharmony_ci     executed with the same <target> and <texture> zero." ...
3395bd8deadSopenharmony_ci
3405bd8deadSopenharmony_ci --  Section 3.8.10 "Texture Application"
3415bd8deadSopenharmony_ci
3425bd8deadSopenharmony_ci     Replace the beginning sentences of the first paragraph (page 138)
3435bd8deadSopenharmony_ci     with:
3445bd8deadSopenharmony_ci
3455bd8deadSopenharmony_ci     "Texturing is enabled or disabled using the generic Enable
3465bd8deadSopenharmony_ci     and Disable commands, respectively, with the symbolic constants
3475bd8deadSopenharmony_ci     TEXTURE_2D or TEXTURE_CUBE_MAP_OES to enable the two-dimensional or cube
3485bd8deadSopenharmony_ci     map texturing respectively.  If the cube map texture and the two-
3495bd8deadSopenharmony_ci     dimensional texture are enabled, then cube map texturing is used.  If
3505bd8deadSopenharmony_ci     texturing is disabled, a rasterized fragment is passed on unaltered to the
3515bd8deadSopenharmony_ci     next stage of the GL (although its texture coordinates may be discarded).
3525bd8deadSopenharmony_ci     Otherwise, a texture value is found according to the parameter values of
3535bd8deadSopenharmony_ci     the currently bound texture image of the appropriate dimensionality.
3545bd8deadSopenharmony_ci
3555bd8deadSopenharmony_ci     However, when cube map texturing is enabled, the rules are
3565bd8deadSopenharmony_ci     more complicated.  For cube map texturing, the (s,t,r) texture
3575bd8deadSopenharmony_ci     coordinates are treated as a direction vector (rx,ry,rz) emanating
3585bd8deadSopenharmony_ci     from the center of a cube.  (The q coordinate can be ignored since
3595bd8deadSopenharmony_ci     it merely scales the vector without affecting the direction.) At
3605bd8deadSopenharmony_ci     texture application time, the interpolated per-fragment (s,t,r)
3615bd8deadSopenharmony_ci     selects one of the cube map face's 2D image based on the largest
3625bd8deadSopenharmony_ci     magnitude coordinate direction (the major axis direction).  If two
3635bd8deadSopenharmony_ci     or more coordinates have the identical magnitude, the implementation
3645bd8deadSopenharmony_ci     may define the rule to disambiguate this situation.  The rule must
3655bd8deadSopenharmony_ci     be deterministic and depend only on (rx,ry,rz).  The target column
3665bd8deadSopenharmony_ci     in the table below explains how the major axis direction maps to
3675bd8deadSopenharmony_ci     the 2D image of a particular cube map target.
3685bd8deadSopenharmony_ci
3695bd8deadSopenharmony_ci      major axis
3705bd8deadSopenharmony_ci      direction     target                             sc     tc    ma
3715bd8deadSopenharmony_ci      ----------    -------------------------------    ---    ---   ---
3725bd8deadSopenharmony_ci       +rx          TEXTURE_CUBE_MAP_POSITIVE_X_OES    -rz    -ry   rx
3735bd8deadSopenharmony_ci       -rx          TEXTURE_CUBE_MAP_NEGATIVE_X_OES    +rz    -ry   rx
3745bd8deadSopenharmony_ci       +ry          TEXTURE_CUBE_MAP_POSITIVE_Y_OES    +rx    +rz   ry
3755bd8deadSopenharmony_ci       -ry          TEXTURE_CUBE_MAP_NEGATIVE_Y_OES    +rx    -rz   ry
3765bd8deadSopenharmony_ci       +rz          TEXTURE_CUBE_MAP_POSITIVE_Z_OES    +rx    -ry   rz
3775bd8deadSopenharmony_ci       -rz          TEXTURE_CUBE_MAP_NEGATIVE_Z_OES    -rx    -ry   rz
3785bd8deadSopenharmony_ci
3795bd8deadSopenharmony_ci     Using the sc, tc, and ma determined by the major axis direction as
3805bd8deadSopenharmony_ci     specified in the table above, an updated (s,t) is calculated as
3815bd8deadSopenharmony_ci     follows
3825bd8deadSopenharmony_ci
3835bd8deadSopenharmony_ci        s   =   ( sc/|ma| + 1 ) / 2
3845bd8deadSopenharmony_ci        t   =   ( tc/|ma| + 1 ) / 2
3855bd8deadSopenharmony_ci
3865bd8deadSopenharmony_ci     This new (s,t) is used to find a texture value in the determined
3875bd8deadSopenharmony_ci     face's 2D texture image using the rules given in sections 3.8.5
3885bd8deadSopenharmony_ci     and 3.8.6." ...
3895bd8deadSopenharmony_ci
3905bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations
3915bd8deadSopenharmony_ciand the Frame Buffer)
3925bd8deadSopenharmony_ci
3935bd8deadSopenharmony_ci     None
3945bd8deadSopenharmony_ci
3955bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.2 Specification (Special Functions)
3965bd8deadSopenharmony_ci
3975bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.2 Specification (State and State Requests)
3985bd8deadSopenharmony_ci
3995bd8deadSopenharmony_ci --  Section 6.1.3 "Enumerated Queries"
4005bd8deadSopenharmony_ci
4015bd8deadSopenharmony_ci     Change the fourth paragraph (page 183) to say:
4025bd8deadSopenharmony_ci
4035bd8deadSopenharmony_ci     "The GetTexParameter parameter <target> may be one of TEXTURE_2D,
4045bd8deadSopenharmony_ci     or TEXTURE_CUBE_MAP_OES, indicating the currently bound two-dimensional
4055bd8deadSopenharmony_ci     or cube map texture object."
4065bd8deadSopenharmony_ci
4075bd8deadSopenharmony_ciAdditions to the GLX Specification
4085bd8deadSopenharmony_ci
4095bd8deadSopenharmony_ci     None
4105bd8deadSopenharmony_ci
4115bd8deadSopenharmony_ciErrors
4125bd8deadSopenharmony_ci
4135bd8deadSopenharmony_ci     INVALID_VALUE is generated when the target parameter to TexImage2D
4145bd8deadSopenharmony_ci     or CopyTexImage2D is one of the six cube map 2D image targets and
4155bd8deadSopenharmony_ci     the width and height parameters are not equal.
4165bd8deadSopenharmony_ci
4175bd8deadSopenharmony_ciNew State
4185bd8deadSopenharmony_ci
4195bd8deadSopenharmony_ci(table 6.12, p202) add the following entries:
4205bd8deadSopenharmony_ci
4215bd8deadSopenharmony_ciGet Value                        Type    Get Command   Initial Value   Description           Sec    Attribute
4225bd8deadSopenharmony_ci---------                        ----    -----------   -------------   -----------           ------ --------------
4235bd8deadSopenharmony_ciTEXTURE_CUBE_MAP_OES             B       IsEnabled     False           True if cube map      3.8.10 texture/enable
4245bd8deadSopenharmony_ci                                                                       texturing is enabled
4255bd8deadSopenharmony_ciTEXTURE_BINDING_CUBE_MAP_OES     Z+      GetIntegerv   0               Texture object        3.8.8  texture
4265bd8deadSopenharmony_ci                                                                       for TEXTURE_CUBE_MAP
4275bd8deadSopenharmony_ciTEXTURE_CUBE_MAP_POSITIVE_X_OES  nxI     N/A           see 3.8         positive x face       3.8    -
4285bd8deadSopenharmony_ci                                                                       cube map texture
4295bd8deadSopenharmony_ci                                                                       image at lod i
4305bd8deadSopenharmony_ciTEXTURE_CUBE_MAP_NEGATIVE_X_OES  nxI     N/A           see 3.8         negative x face       3.8    -
4315bd8deadSopenharmony_ci                                                                       cube map texture
4325bd8deadSopenharmony_ci                                                                       image at lod i
4335bd8deadSopenharmony_ciTEXTURE_CUBE_MAP_POSITIVE_Y_OES  nxI     N/A           see 3.8         positive y face       3.8    -
4345bd8deadSopenharmony_ci                                                                       cube map texture
4355bd8deadSopenharmony_ci                                                                       image at lod i
4365bd8deadSopenharmony_ciTEXTURE_CUBE_MAP_NEGATIVE_Y_OES  nxI     N/A           see 3.8         negative y face       3.8    -
4375bd8deadSopenharmony_ci                                                                       cube map texture
4385bd8deadSopenharmony_ci                                                                       image at lod i
4395bd8deadSopenharmony_ciTEXTURE_CUBE_MAP_POSITIVE_Z_OES  nxI     N/A           see 3.8         positive z face       3.8    -
4405bd8deadSopenharmony_ci                                                                       cube map texture
4415bd8deadSopenharmony_ci                                                                       image at lod i
4425bd8deadSopenharmony_ciTEXTURE_CUBE_MAP_NEGATIVE_Z_OES  nxI     N/A           see 3.8         negative z face       3.8    -
4435bd8deadSopenharmony_ci                                                                       cube map texture
4445bd8deadSopenharmony_ci                                                                       image at lod i
4455bd8deadSopenharmony_ci
4465bd8deadSopenharmony_ci(table 6.14, p204) add the following entries:
4475bd8deadSopenharmony_ci
4485bd8deadSopenharmony_ciGet Value            Type Get Command    Initial Value      Description Sec     Attribute
4495bd8deadSopenharmony_ci---------            ---- -----------    -------------      ----------- ------  ---------
4505bd8deadSopenharmony_ciTEXTURE_GEN_MODE_OES Z2   GetTexGenivOES REFLECTION_MAP_OES Function used for   2.10.4 texture
4515bd8deadSopenharmony_ci                                                            texgen (for s,t,r)
4525bd8deadSopenharmony_ciTEXTURE_GEN_STR_OES  B    IsEnabled      FALSE              True if texgen is   2.10.4 texture
4535bd8deadSopenharmony_ci                                                            enabled (for s,t,r)
4545bd8deadSopenharmony_ci
4555bd8deadSopenharmony_ciNew Implementation Dependent State
4565bd8deadSopenharmony_ci
4575bd8deadSopenharmony_ci(table 6.24, p214) add the following entry:
4585bd8deadSopenharmony_ci
4595bd8deadSopenharmony_ciGet Value                       Type    Get Command   Minimum Value   Description           Sec    Attribute
4605bd8deadSopenharmony_ci---------                       ----    -----------   -------------   -----------           ------ --------------
4615bd8deadSopenharmony_ciMAX_CUBE_MAP_TEXTURE_SIZE_OES   Z+      GetIntegerv   16              Maximum cube map      3.8.1  -
4625bd8deadSopenharmony_ci                                                                      texture image
4635bd8deadSopenharmony_ci                                                                      dimension
4645bd8deadSopenharmony_ci
4655bd8deadSopenharmony_ciRevision History
4665bd8deadSopenharmony_ci
4675bd8deadSopenharmony_ciVersion 1, November 8, 2007 (Benj Lipchak) - First version cleaned up for ES
4685bd8deadSopenharmony_ciVersion 2, April 16, 2015 (Jon Leech) - Remove border width term bt (nonexistent in ES)
469