15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    NV_texture_array
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_NV_texture_array
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContributors
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Contributors to the OpenGL EXT_texture_array extension
125bd8deadSopenharmony_ci    Mathias Heyer, NVIDIA
135bd8deadSopenharmony_ci    Greg Roth, NVIDIA
145bd8deadSopenharmony_ci    Ian Stewart, NVIDIA
155bd8deadSopenharmony_ci    Nuno Subtil, NVIDIA
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ciContact
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ci    Ian Stewart, NVIDIA Corporation (istewart 'at' nvidia.com)
205bd8deadSopenharmony_ci
215bd8deadSopenharmony_ciStatus
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ci    Complete.
245bd8deadSopenharmony_ci
255bd8deadSopenharmony_ciVersion
265bd8deadSopenharmony_ci
275bd8deadSopenharmony_ci    Last Modifed Date: Sep 25, 2012
285bd8deadSopenharmony_ci    NVIDIA Revision: 4
295bd8deadSopenharmony_ci
305bd8deadSopenharmony_ciNumber
315bd8deadSopenharmony_ci
325bd8deadSopenharmony_ci    OpenGL ES Extension #133
335bd8deadSopenharmony_ci
345bd8deadSopenharmony_ciDependencies
355bd8deadSopenharmony_ci
365bd8deadSopenharmony_ci    This extension is written against the OpenGL ES 2.0.25
375bd8deadSopenharmony_ci    Specification.
385bd8deadSopenharmony_ci
395bd8deadSopenharmony_ci    This extension depends on EXT_unpack_subimage.
405bd8deadSopenharmony_ci
415bd8deadSopenharmony_ci    This extension interacts with OES_texture_3D.
425bd8deadSopenharmony_ci    This extension interacts with OES_depth_texture.
435bd8deadSopenharmony_ci    This extension interacts with OES_packed_depth_stencil.
445bd8deadSopenharmony_ci    This extension interacts with OES_texture_npot.
455bd8deadSopenharmony_ci    This extension interacts with NV_pixel_buffer_object.
465bd8deadSopenharmony_ci    This extension interacts with NV_texture_npot_2D_mipmap.
475bd8deadSopenharmony_ci    This extension interacts with NV_framebuffer_blit.
485bd8deadSopenharmony_ci
495bd8deadSopenharmony_ciOverview
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ci    This extension introduces the notion of two-dimensional array
525bd8deadSopenharmony_ci    textures.  An array texture is a collection of two-dimensional
535bd8deadSopenharmony_ci    images of identical size and format, arranged in layers.  Array
545bd8deadSopenharmony_ci    textures are specified using TexImage3DNV, where the depth is
555bd8deadSopenharmony_ci    used to indicate the number of layers in the image.
565bd8deadSopenharmony_ci
575bd8deadSopenharmony_ci    An array texture is accessed as a single unit in a programmable
585bd8deadSopenharmony_ci    shader, using a single coordinate vector.  A single layer is
595bd8deadSopenharmony_ci    selected, using the "p" texture coordinate, and that layer is then
605bd8deadSopenharmony_ci    accessed as though it were a two-dimensional texture.  The layer
615bd8deadSopenharmony_ci    coordinate is provided as an unnormalized floating-point value in
625bd8deadSopenharmony_ci    the range [0,<n>-1], where <n> is the number of layers in the
635bd8deadSopenharmony_ci    array texture.  Texture lookups do not filter between layers,
645bd8deadSopenharmony_ci    though such filtering can be achieved using programmable shaders.
655bd8deadSopenharmony_ci    When mipmapping is used, each level of an array texture has the
665bd8deadSopenharmony_ci    same number of layers as the base level; the number of layers is
675bd8deadSopenharmony_ci    not reduced as the image size decreases.
685bd8deadSopenharmony_ci
695bd8deadSopenharmony_ci    Single layers of array textures can be rendered to by binding them
705bd8deadSopenharmony_ci    to a framebuffer object using the FramebufferTextureLayerNV
715bd8deadSopenharmony_ci    function.
725bd8deadSopenharmony_ci
735bd8deadSopenharmony_ciNew Procedures and Functions
745bd8deadSopenharmony_ci
755bd8deadSopenharmony_ci    void TexImage3DNV(enum target, int level, enum internalFormat,
765bd8deadSopenharmony_ci                      sizei width, sizei height, sizei depth, int border,
775bd8deadSopenharmony_ci                      enum format, enum type, const void *pixels)
785bd8deadSopenharmony_ci
795bd8deadSopenharmony_ci    void TexSubImage3DNV(enum target, int level,
805bd8deadSopenharmony_ci                         int xoffset, int yoffset, int zoffset,
815bd8deadSopenharmony_ci                         sizei width, sizei height, sizei depth,
825bd8deadSopenharmony_ci                         enum format, enum type, const void *pixels)
835bd8deadSopenharmony_ci
845bd8deadSopenharmony_ci    void CopyTexSubImage3DNV(enum target, int level,
855bd8deadSopenharmony_ci                             int xoffset, int yoffset, int zoffset,
865bd8deadSopenharmony_ci                             int x, int y, sizei width, sizei height)
875bd8deadSopenharmony_ci
885bd8deadSopenharmony_ci    void CompressedTexImage3DNV(enum target, int level, enum internalformat,
895bd8deadSopenharmony_ci                                sizei width, sizei height, sizei depth,
905bd8deadSopenharmony_ci                                int border, sizei imageSize, const void *data)
915bd8deadSopenharmony_ci
925bd8deadSopenharmony_ci    void CompressedTexSubImage3DNV(enum target, int level,
935bd8deadSopenharmony_ci                                   int xoffset, int yoffset, int zoffset,
945bd8deadSopenharmony_ci                                   sizei width, sizei height, sizei depth,
955bd8deadSopenharmony_ci                                   enum format, sizei imageSize,
965bd8deadSopenharmony_ci                                   const void *data)
975bd8deadSopenharmony_ci
985bd8deadSopenharmony_ci    void FramebufferTextureLayerNV(enum target, enum attachment,
995bd8deadSopenharmony_ci                                   uint texture, int level, int layer);
1005bd8deadSopenharmony_ci
1015bd8deadSopenharmony_ciNew Tokens
1025bd8deadSopenharmony_ci
1035bd8deadSopenharmony_ci    Accepted by the <target> parameter of TexImage3DNV,
1045bd8deadSopenharmony_ci    TexSubImage3DNV, CopyTexSubImage3DNV, CompressedTexImage3DNV,
1055bd8deadSopenharmony_ci    CompressedTexSubImage3DNV, TexParameteri, TexParameteriv,
1065bd8deadSopenharmony_ci    TexParameterf, TexParameterfv, GenerateMipmap, and BindTexture:
1075bd8deadSopenharmony_ci
1085bd8deadSopenharmony_ci        TEXTURE_2D_ARRAY_NV                             0x8C1A
1095bd8deadSopenharmony_ci
1105bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetBooleanv, GetIntegerv and
1115bd8deadSopenharmony_ci    GetFloatv:
1125bd8deadSopenharmony_ci
1135bd8deadSopenharmony_ci        TEXTURE_BINDING_2D_ARRAY_NV                     0x8C1D
1145bd8deadSopenharmony_ci        MAX_ARRAY_TEXTURE_LAYERS_NV                     0x88FF
1155bd8deadSopenharmony_ci
1165bd8deadSopenharmony_ci    Accepted by the <pname> parameter of
1175bd8deadSopenharmony_ci    GetFramebufferAttachmentParameteriv:
1185bd8deadSopenharmony_ci
1195bd8deadSopenharmony_ci        FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_NV         0x8CD4
1205bd8deadSopenharmony_ci
1215bd8deadSopenharmony_ci    Returned by the <type> parameter of GetActiveUniform:
1225bd8deadSopenharmony_ci
1235bd8deadSopenharmony_ci        SAMPLER_2D_ARRAY_NV                             0x8DC1
1245bd8deadSopenharmony_ci
1255bd8deadSopenharmony_ci    Accepted by the <pname> parameter of PixelStorei, GetBooleanv,
1265bd8deadSopenharmony_ci    GetIntegerv and GetFloatv:
1275bd8deadSopenharmony_ci
1285bd8deadSopenharmony_ci        UNPACK_SKIP_IMAGES_NV                           0x806D
1295bd8deadSopenharmony_ci        UNPACK_IMAGE_HEIGHT_NV                          0x806E
1305bd8deadSopenharmony_ci
1315bd8deadSopenharmony_ciNew GLSL defines
1325bd8deadSopenharmony_ci
1335bd8deadSopenharmony_ci    #define GL_NV_texture_array 1
1345bd8deadSopenharmony_ci
1355bd8deadSopenharmony_ciNew GLSL sampler types
1365bd8deadSopenharmony_ci
1375bd8deadSopenharmony_ci    sampler2DArrayNV
1385bd8deadSopenharmony_ci
1395bd8deadSopenharmony_ciGLSL Grammar Changes
1405bd8deadSopenharmony_ci
1415bd8deadSopenharmony_ci    The token SAMPLER2DARRAYNV is added to the list of tokens returned
1425bd8deadSopenharmony_ci    from lexical analysis and the type_specifier_no_prec production.
1435bd8deadSopenharmony_ci
1445bd8deadSopenharmony_ciNew GLSL functions
1455bd8deadSopenharmony_ci
1465bd8deadSopenharmony_ci    texture2DArrayNV()
1475bd8deadSopenharmony_ci    texture2DArrayLodNV()
1485bd8deadSopenharmony_ci
1495bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL ES 2.0.25 Specification
1505bd8deadSopenharmony_ci
1515bd8deadSopenharmony_ci    Modify section 2.10.4, "Shader Variables"
1525bd8deadSopenharmony_ci
1535bd8deadSopenharmony_ci    (add the following new return type to the description of
1545bd8deadSopenharmony_ci     GetActiveUniform)
1555bd8deadSopenharmony_ci
1565bd8deadSopenharmony_ci        SAMPLER_2D_ARRAY_NV
1575bd8deadSopenharmony_ci
1585bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL ES 2.0.25 Specification
1595bd8deadSopenharmony_ci
1605bd8deadSopenharmony_ci    Modify Section 3.6.1, "Pixel Storage Modes"
1615bd8deadSopenharmony_ci
1625bd8deadSopenharmony_ci    Replace the first sentence:
1635bd8deadSopenharmony_ci
1645bd8deadSopenharmony_ci    Pixel storage modes affect the operation of TexImage*D,
1655bd8deadSopenharmony_ci    TexSubImage*D, and ReadPixels when one of these commands is issued. 
1665bd8deadSopenharmony_ci
1675bd8deadSopenharmony_ci    Add to table 3.1
1685bd8deadSopenharmony_ci
1695bd8deadSopenharmony_ci    Parameter Name          Type      Initial Value   Valid Range
1705bd8deadSopenharmony_ci    ----------------------  -------   -------------   ------------
1715bd8deadSopenharmony_ci    UNPACK_SKIP_IMAGES_NV   integer   0               [0,Infinity)
1725bd8deadSopenharmony_ci    UNPACK_IMAGE_HEIGHT_NV  integer   0               [0,Infinity)
1735bd8deadSopenharmony_ci
1745bd8deadSopenharmony_ci    Modify Section 3.7.1, "Texture Image Specification"
1755bd8deadSopenharmony_ci
1765bd8deadSopenharmony_ci    Replace the entire section with:
1775bd8deadSopenharmony_ci
1785bd8deadSopenharmony_ci    The command
1795bd8deadSopenharmony_ci
1805bd8deadSopenharmony_ci      void TexImage3DNV(enum target, int level, int internalformat,
1815bd8deadSopenharmony_ci                        sizei width, sizei height, sizei depth, int border,
1825bd8deadSopenharmony_ci                        enum format, enum type, void *data);
1835bd8deadSopenharmony_ci
1845bd8deadSopenharmony_ci    is used to specify a three-dimensional image for a two-dimensional
1855bd8deadSopenharmony_ci    array texture. <target> must be TEXTURE_2D_ARRAY_NV. <format>,
1865bd8deadSopenharmony_ci    <type>, and <data> specify the format of the image data, the type of
1875bd8deadSopenharmony_ci    those data, and a reference to the image data in the currently bound
1885bd8deadSopenharmony_ci    pixel unpack buffer or client memory, as described in section 3.6.2.
1895bd8deadSopenharmony_ci
1905bd8deadSopenharmony_ci    The groups in memory are treated as being arranged in a sequence of
1915bd8deadSopenharmony_ci    adjacent rectangles. Each rectangle is a two-dimensional image,
1925bd8deadSopenharmony_ci    whose size and organization are specified by the <width> and
1935bd8deadSopenharmony_ci    <height> parameters to TexImage3DNV. The values of UNPACK_ROW_-
1945bd8deadSopenharmony_ci    LENGTH_EXT and UNPACK_ALIGNMENT control the row-to-row spacing in
1955bd8deadSopenharmony_ci    these images as described in section 3.6.2. If the value of the
1965bd8deadSopenharmony_ci    integer parameter UNPACK_IMAGE_HEIGHT_NV is zero, then the number of
1975bd8deadSopenharmony_ci    rows in each two-dimensional image is height; otherwise the number
1985bd8deadSopenharmony_ci    of rows is UNPACK_IMAGE_HEIGHT_NV. Each two-dimensional image
1995bd8deadSopenharmony_ci    comprises an integral number of rows, and is exactly adjacent to its
2005bd8deadSopenharmony_ci    neighbor images.
2015bd8deadSopenharmony_ci
2025bd8deadSopenharmony_ci    The mechanism for selecting a sub-volume of a three-dimensional
2035bd8deadSopenharmony_ci    image relies on the integer parameter UNPACK_SKIP_IMAGES_NV. If
2045bd8deadSopenharmony_ci    UNPACK_SKIP_IMAGES_NV is positive, the pointer is advanced by
2055bd8deadSopenharmony_ci    UNPACK_SKIP_IMAGES_NV times the number of elements in one two-
2065bd8deadSopenharmony_ci    dimensional image before obtaining the first group from memory.
2075bd8deadSopenharmony_ci    Then <depth> two-dimensional images are processed, each having a
2085bd8deadSopenharmony_ci    subimage extracted as described in section 3.6.2.
2095bd8deadSopenharmony_ci    
2105bd8deadSopenharmony_ci    The selected groups are transferred to the GL as described in
2115bd8deadSopenharmony_ci    section 3.6.2 and then clamped to the representable range of the
2125bd8deadSopenharmony_ci    internal format. For color component groups, if the <internalformat>
2135bd8deadSopenharmony_ci    of the texture is signed or unsigned normalized fixed-point,
2145bd8deadSopenharmony_ci    components are clamped to [-1, 1] or [0, 1], respectively. For depth
2155bd8deadSopenharmony_ci    component groups, the depth value is clamped to [0, 1]. Otherwise,
2165bd8deadSopenharmony_ci    values are not modified.
2175bd8deadSopenharmony_ci
2185bd8deadSopenharmony_ci    Components are then selected from the resulting R, G, B, A, depth,
2195bd8deadSopenharmony_ci    or stencil values to obtain a texture with the base internal format
2205bd8deadSopenharmony_ci    specified by <internalformat>. Table 3.8 summarizes the mapping of
2215bd8deadSopenharmony_ci    R, G, B, A, depth, or stencil values to texture components, as a
2225bd8deadSopenharmony_ci    function of the base internal format of the texture image.
2235bd8deadSopenharmony_ci    <internalformat> may be one of the five internal format symbolic
2245bd8deadSopenharmony_ci    constants listed in table 3.8. Specifying a value for
2255bd8deadSopenharmony_ci    <internalformat> that is not one of the above values generates the
2265bd8deadSopenharmony_ci    error INVALID_VALUE. If internalformat does not match format, the
2275bd8deadSopenharmony_ci    error INVALID_OPERATION is generated.
2285bd8deadSopenharmony_ci
2295bd8deadSopenharmony_ci    The GL stores the resulting texture with internal component
2305bd8deadSopenharmony_ci    resolutions of its own choosing. The allocation of internal
2315bd8deadSopenharmony_ci    component resolution may vary based on any TexImage3DNV or
2325bd8deadSopenharmony_ci    TexImage2D (see below) parameter (except target), but the allocation
2335bd8deadSopenharmony_ci    must not be a function of any other state and cannot be changed once
2345bd8deadSopenharmony_ci    established. Allocations must be invariant; the same allocation must
2355bd8deadSopenharmony_ci    be chosen each time a texture image is specified with the same
2365bd8deadSopenharmony_ci    parameter values.
2375bd8deadSopenharmony_ci
2385bd8deadSopenharmony_ci    The image itself (referred to by data) is a sequence of groups of
2395bd8deadSopenharmony_ci    values. The first group is the lower left back corner of the texture
2405bd8deadSopenharmony_ci    image. Subsequent groups fill out rows of width width from left to
2415bd8deadSopenharmony_ci    right; height rows are stacked from bottom to top forming a single
2425bd8deadSopenharmony_ci    two-dimensional image slice; and depth slices are stacked from back
2435bd8deadSopenharmony_ci    to front. When the final R, G, B, and A components have been
2445bd8deadSopenharmony_ci    computed for a group, they are assigned to components of a texel as
2455bd8deadSopenharmony_ci    described by table 3.8. Counting from zero, each resulting Nth texel
2465bd8deadSopenharmony_ci    is assigned internal integer coordinates (i, j, k), where
2475bd8deadSopenharmony_ci
2485bd8deadSopenharmony_ci        i = (N mod width)
2495bd8deadSopenharmony_ci
2505bd8deadSopenharmony_ci        j = (floor(N/width) mod height)
2515bd8deadSopenharmony_ci
2525bd8deadSopenharmony_ci        k = (floor(N/(width * height) mod depth)
2535bd8deadSopenharmony_ci
2545bd8deadSopenharmony_ci    Thus the last two-dimensional image slice of the three-dimensional
2555bd8deadSopenharmony_ci    image is indexed with the highest value of k.
2565bd8deadSopenharmony_ci
2575bd8deadSopenharmony_ci    If the internal data type of the image array is signed or unsigned
2585bd8deadSopenharmony_ci    normalized fixed-point, each color component is converted as
2595bd8deadSopenharmony_ci    described in section 2.1.2. If the internal type is floating-point,
2605bd8deadSopenharmony_ci    components are clamped to the representable range of the
2615bd8deadSopenharmony_ci    corresponding internal component, but are not converted.
2625bd8deadSopenharmony_ci
2635bd8deadSopenharmony_ci    The <level> argument to TexImage3DNV is an integer level-of-detail
2645bd8deadSopenharmony_ci    number. Levels of detail are discussed below, under Mipmapping. The
2655bd8deadSopenharmony_ci    main texture image has a level of detail number of 0. If a level-of-
2665bd8deadSopenharmony_ci    detail less than zero is specified, the error INVALID_VALUE is
2675bd8deadSopenharmony_ci    generated. If <level> is greater than zero, and either width or
2685bd8deadSopenharmony_ci    height is not a power of two, the error INVALID_VALUE is generated.
2695bd8deadSopenharmony_ci
2705bd8deadSopenharmony_ci    If <border> is not zero, then the error INVALID_VALUE is generated.
2715bd8deadSopenharmony_ci
2725bd8deadSopenharmony_ci    If <width>, <height>, or <depth> are less than zero, then the error
2735bd8deadSopenharmony_ci    INVALID_VALUE is generated.
2745bd8deadSopenharmony_ci
2755bd8deadSopenharmony_ci    The maximum allowable width and height of a texel array for a two-
2765bd8deadSopenharmony_ci    dimensional texture or two-dimensional array texture is an
2775bd8deadSopenharmony_ci    implementation-dependent function of the level-of-detail and
2785bd8deadSopenharmony_ci    internal format of the resulting image array. It must be at least
2795bd8deadSopenharmony_ci    2^(k-lod) for image arrays of level-of-detail 0 through k, where k
2805bd8deadSopenharmony_ci    is the log base 2 of MAX_TEXTURE_SIZE and lod is the level-of-detail
2815bd8deadSopenharmony_ci    of the image array. The maximum allowable width and height of a cube
2825bd8deadSopenharmony_ci    map texture must be the same, and must be at least 2^(k-lod) for
2835bd8deadSopenharmony_ci    image arrays level 0 through k, where k is the log base 2 of
2845bd8deadSopenharmony_ci    MAX_CUBE_MAP_TEXTURE_SIZE.  The maximum number of layers for two-
2855bd8deadSopenharmony_ci    dimensional array textures (depth) must be at least MAX_ARRAY_-
2865bd8deadSopenharmony_ci    TEXTURE_LAYERS_NV for for image arrays level 0 through k. The
2875bd8deadSopenharmony_ci    maximum width, height, and depth may be zero for image arrays of any
2885bd8deadSopenharmony_ci    level-of-detail greater than k. The error INVALID_VALUE is generated
2895bd8deadSopenharmony_ci    if the specified image is too large to be stored under any
2905bd8deadSopenharmony_ci    conditions.
2915bd8deadSopenharmony_ci
2925bd8deadSopenharmony_ci    An implementation may allow an image of level zero to be created
2935bd8deadSopenharmony_ci    only if that single image can be supported. Additional constraints
2945bd8deadSopenharmony_ci    on the creation of images of level one or greater are described in
2955bd8deadSopenharmony_ci    more detail in section 3.7.10.
2965bd8deadSopenharmony_ci
2975bd8deadSopenharmony_ci    If a pixel unpack buffer object is bound and storing texture data
2985bd8deadSopenharmony_ci    would access memory beyond the end of the pixel unpack buffer, an
2995bd8deadSopenharmony_ci    INVALID_OPERATION error results.
3005bd8deadSopenharmony_ci
3015bd8deadSopenharmony_ci    The command
3025bd8deadSopenharmony_ci
3035bd8deadSopenharmony_ci        void TexImage2D(enum target, int level, int internalformat,
3045bd8deadSopenharmony_ci                        sizei width, sizei height, int border, enum format,
3055bd8deadSopenharmony_ci                        enum type, const void *data);
3065bd8deadSopenharmony_ci
3075bd8deadSopenharmony_ci    is used to specify a two-dimensional texture image. target must be
3085bd8deadSopenharmony_ci    one of TEXTURE_2D for a two-dimensional texture, or one of TEXTURE_-
3095bd8deadSopenharmony_ci    CUBE_MAP_POSITIVE_X, TEXTURE_CUBE_MAP_NEGATIVE_X, TEXTURE_CUBE_MAP_-
3105bd8deadSopenharmony_ci    POSITIVE_Y, TEXTURE_CUBE_MAP_NEGATIVE_Y, TEXTURE_CUBE_MAP_POSITIVE_Z,
3115bd8deadSopenharmony_ci    or TEXTURE_CUBE_MAP_NEGATIVE_Z for a cube map texture. The other
3125bd8deadSopenharmony_ci    parameters match the corresponding parameters of TexImage3DNV.
3135bd8deadSopenharmony_ci
3145bd8deadSopenharmony_ci    For the purposes of decoding the texture image, TexImage2D is
3155bd8deadSopenharmony_ci    equivalent to calling TexImage3DNV with corresponding arguments and
3165bd8deadSopenharmony_ci    depth of 1, except that UNPACK_SKIP_IMAGES_NV is ignored.
3175bd8deadSopenharmony_ci
3185bd8deadSopenharmony_ci    A two-dimensional texture consists of a single two-dimensional
3195bd8deadSopenharmony_ci    texture image. A cube map texture is a set of six two-dimensional
3205bd8deadSopenharmony_ci    texture images. The six cube map texture targets form a single cube
3215bd8deadSopenharmony_ci    map texture though each target names a distinct face of the cube
3225bd8deadSopenharmony_ci    map. The TEXTURE_CUBE_MAP_* targets listed above update their
3235bd8deadSopenharmony_ci    appropriate cube map face 2D texture image. Note that the six cube
3245bd8deadSopenharmony_ci    map two-dimensional image tokens such as TEXTURE_CUBE_MAP_POSITIVE_X
3255bd8deadSopenharmony_ci    are used when specifying, updating, or querying one of a cube map's
3265bd8deadSopenharmony_ci    six two-dimensional images, but when binding to a cube map texture
3275bd8deadSopenharmony_ci    object (that is when the cube map is accessed as a whole as opposed
3285bd8deadSopenharmony_ci    to a particular two-dimensional image), the TEXTURE_CUBE_MAP target
3295bd8deadSopenharmony_ci    is specified.
3305bd8deadSopenharmony_ci
3315bd8deadSopenharmony_ci    When the target parameter to TexImage2D is one of the six cube map
3325bd8deadSopenharmony_ci    two-dimensional image targets, the error INVALID_VALUE is generated
3335bd8deadSopenharmony_ci    if the width and height parameters are not equal.
3345bd8deadSopenharmony_ci
3355bd8deadSopenharmony_ci    An INVALID_VALUE error is generated if border is non-zero.
3365bd8deadSopenharmony_ci
3375bd8deadSopenharmony_ci    The image indicated to the GL by the image pointer is decoded and
3385bd8deadSopenharmony_ci    copied into the GL's internal memory.
3395bd8deadSopenharmony_ci
3405bd8deadSopenharmony_ci    We shall refer to the decoded image as the texel array. A three-
3415bd8deadSopenharmony_ci    dimensional texel array has width, height, and depth <wt>, <ht>, and
3425bd8deadSopenharmony_ci    <dt>. A two-dimensional texel array has depth <dt> = 1, with height
3435bd8deadSopenharmony_ci    <ht> and width <wt> as above.
3445bd8deadSopenharmony_ci
3455bd8deadSopenharmony_ci    An element (i, j, k) of the texel array is called a texel (for a
3465bd8deadSopenharmony_ci    non-array two-dimensional texture, k is irrelevant). The texture
3475bd8deadSopenharmony_ci    value used in texturing a fragment is determined by sampling the
3485bd8deadSopenharmony_ci    texture in a shader, but may not correspond to any actual texel. See
3495bd8deadSopenharmony_ci    figure 3.6.
3505bd8deadSopenharmony_ci
3515bd8deadSopenharmony_ci    If the <data> argument of TexImage2D or TexImage3DNV is a NULL
3525bd8deadSopenharmony_ci    pointer, and the pixel unpack buffer object is zero, a two- or
3535bd8deadSopenharmony_ci    three-dimensional texel array is created with the specified target,
3545bd8deadSopenharmony_ci    level, internalformat, border, width, height, and depth, but with
3555bd8deadSopenharmony_ci    unspecified image contents. In this case no pixel values are
3565bd8deadSopenharmony_ci    accessed in client memory, and no pixel processing is performed.
3575bd8deadSopenharmony_ci    Errors are generated, however, exactly as though the data pointer
3585bd8deadSopenharmony_ci    were valid. Otherwise if the pixel unpack buffer object is non-zero,
3595bd8deadSopenharmony_ci    the data argument is treatedly normally to refer to the beginning of
3605bd8deadSopenharmony_ci    the pixel unpack buffer object's data.
3615bd8deadSopenharmony_ci
3625bd8deadSopenharmony_ci    Modify Section 3.7.2, "Alternate Texture Image Specification
3635bd8deadSopenharmony_ci    Commands"
3645bd8deadSopenharmony_ci
3655bd8deadSopenharmony_ci    Replace paragraphs 4 through 6 starting with the description of
3665bd8deadSopenharmony_ci    additional commands:
3675bd8deadSopenharmony_ci
3685bd8deadSopenharmony_ci    Four additional commands,
3695bd8deadSopenharmony_ci
3705bd8deadSopenharmony_ci        void TexSubImage3DNV(enum target, int level, int xoffset,
3715bd8deadSopenharmony_ci                           int yoffset, int zoffset, sizei width,
3725bd8deadSopenharmony_ci                           sizei height, sizei depth, enum format,
3735bd8deadSopenharmony_ci                           enum type, const void *data);
3745bd8deadSopenharmony_ci        void TexSubImage2D(enum target, int level, int xoffset,
3755bd8deadSopenharmony_ci                           int yoffset, sizei width, sizei height,
3765bd8deadSopenharmony_ci                           enum format, enum type, const void *data);
3775bd8deadSopenharmony_ci        void CopyTexSubImage3DNV(enum target, int level, int xoffset,
3785bd8deadSopenharmony_ci                               int yoffset, int zoffset, int x, int y,
3795bd8deadSopenharmony_ci                               sizei width, sizei height);
3805bd8deadSopenharmony_ci        void CopyTexSubImage2D(enum target, int level, int xoffset,
3815bd8deadSopenharmony_ci                               int yoffset, int x, int y, sizei width,
3825bd8deadSopenharmony_ci                               sizei height);
3835bd8deadSopenharmony_ci
3845bd8deadSopenharmony_ci    respecify only a rectangular subregion of an existing texel array.
3855bd8deadSopenharmony_ci    No change is made to the <internalformat>, <width>, <height>,
3865bd8deadSopenharmony_ci    <depth>, or <border> parameters of the specified texel array, nor is
3875bd8deadSopenharmony_ci    any change made to texel values outside the specified subregion.
3885bd8deadSopenharmony_ci    The <target> arguments of TexSubImage2D and CopyTexSubImage2D must
3895bd8deadSopenharmony_ci    be one of TEXTURE_2D, TEXTURE_CUBE_MAP_POSITIVE_X, TEXTURE_CUBE_-
3905bd8deadSopenharmony_ci    MAP_NEGATIVE_X, TEXTURE_CUBE_MAP_POSITIVE_Y, TEXTURE_CUBE_MAP_-
3915bd8deadSopenharmony_ci    NEGATIVE_Y, TEXTURE_CUBE_MAP_POSITIVE_Z, or TEXTURE_CUBE_MAP_-
3925bd8deadSopenharmony_ci    NEGATIVE_Z, and the <target> arguments of TexSubImage3DNV and
3935bd8deadSopenharmony_ci    CopyTexSubImage3DNV must be TEXTURE_2D_ARRAY_NV. The
3945bd8deadSopenharmony_ci    <level> parameter of each command specifies the level of the texel
3955bd8deadSopenharmony_ci    array that is modified. If level is less than zero or greater than
3965bd8deadSopenharmony_ci    the base 2 logarithm of the maximum texture width, height, or depth,
3975bd8deadSopenharmony_ci    the error INVALID_VALUE is generated.
3985bd8deadSopenharmony_ci
3995bd8deadSopenharmony_ci    TexSubImage3DNV arguments <width>, <height>, <depth>, <format>,
4005bd8deadSopenharmony_ci    <type>, and <data> match the corresponding arguments to
4015bd8deadSopenharmony_ci    TexImage3DNV, meaning that they are specified using the same values,
4025bd8deadSopenharmony_ci    and have the same meanings. Likewise, TexSubImage2D arguments
4035bd8deadSopenharmony_ci    <width>, <height>, <format>, <type>, and <data> match the
4045bd8deadSopenharmony_ci    corresponding arguments to TexImage2D.
4055bd8deadSopenharmony_ci
4065bd8deadSopenharmony_ci    CopyTexSubImage3DNV and CopyTexSubImage2D arguments <x>, <y>,
4075bd8deadSopenharmony_ci    <width>, and <height> match the corresponding arguments to
4085bd8deadSopenharmony_ci    CopyTexImage2D. Each of the TexSubImage commands interprets and
4095bd8deadSopenharmony_ci    processes pixel groups in exactly the manner of its TexImage
4105bd8deadSopenharmony_ci    counterpart, except that the assignment of R, G, B, A, depth, and
4115bd8deadSopenharmony_ci    stencil pixel group values to the texture components is controlled
4125bd8deadSopenharmony_ci    by the <internalformat> of the texel array, not by an argument to
4135bd8deadSopenharmony_ci    the command. The same constraints and errors apply to the
4145bd8deadSopenharmony_ci    TexSubImage commands' argument <format> and the <internalformat> of
4155bd8deadSopenharmony_ci    the texel array being respecified as apply to the <format> and
4165bd8deadSopenharmony_ci    <internalformat> arguments of its TexImage counterparts.
4175bd8deadSopenharmony_ci
4185bd8deadSopenharmony_ci    Arguments <xoffset>, <yoffset>, and <zoffset> of TexSubImage3DNV and
4195bd8deadSopenharmony_ci    CopyTexSubImage3DNV specify the lower left texel coordinates of a
4205bd8deadSopenharmony_ci    <width>-wide by <height>-high by <depth>-deep rectangular subregion
4215bd8deadSopenharmony_ci    of the texel array. The <depth> argument associated with
4225bd8deadSopenharmony_ci    CopyTexSubImage3DNV is always 1, because framebuffer memory is two-
4235bd8deadSopenharmony_ci    dimensional - only a portion of a single <s>, <t> slice of a three-
4245bd8deadSopenharmony_ci    dimensional texture is replaced by CopyTexSubImage3DNV.
4255bd8deadSopenharmony_ci
4265bd8deadSopenharmony_ci    Taking <wt>, <ht>, and <dt> to be the specified width, height, and
4275bd8deadSopenharmony_ci    depth of the texel array, and taking <x>, <y>, <z>, <w>, <h>, and
4285bd8deadSopenharmony_ci    <d> to be the <xoffset>, <yoffset>, <zoffset>, <width>, <height>,
4295bd8deadSopenharmony_ci    and <depth> argument values, any of the following relationships
4305bd8deadSopenharmony_ci    generates the error INVALID_VALUE:
4315bd8deadSopenharmony_ci
4325bd8deadSopenharmony_ci        x < 0
4335bd8deadSopenharmony_ci        x + w > wt
4345bd8deadSopenharmony_ci        y < 0
4355bd8deadSopenharmony_ci        y + h > ht
4365bd8deadSopenharmony_ci        z < 0
4375bd8deadSopenharmony_ci        z + d > dt
4385bd8deadSopenharmony_ci
4395bd8deadSopenharmony_ci    Counting from zero, the <n>th pixel group is assigned to the texel
4405bd8deadSopenharmony_ci    with internal integer coordinates [i, j, k], where
4415bd8deadSopenharmony_ci
4425bd8deadSopenharmony_ci        i = x + (n mod w)
4435bd8deadSopenharmony_ci        j = y + (floor(n/w) mod h)
4445bd8deadSopenharmony_ci        k = z + (floor (n/(width*height)) mod d)
4455bd8deadSopenharmony_ci
4465bd8deadSopenharmony_ci    Replace the last two paragraphs of 3.7.2:
4475bd8deadSopenharmony_ci
4485bd8deadSopenharmony_ci    Calling CopyTexSubImage3DNV, CopyTexImage2D, or CopyTexSubImage2D
4495bd8deadSopenharmony_ci    will result in an INVALID_FRAMEBUFFER_OPERATION error if the object
4505bd8deadSopenharmony_ci    bound to READ_FRAMEBUFFER_BINDING_NV is not framebuffer complete
4515bd8deadSopenharmony_ci    (see section 4.4.5).
4525bd8deadSopenharmony_ci
4535bd8deadSopenharmony_ci    "Texture Copying Feedback Loops"
4545bd8deadSopenharmony_ci
4555bd8deadSopenharmony_ci    Calling CopyTexSubImage3DNV, CopyTexImage2D, or CopyTexSubImage2D
4565bd8deadSopenharmony_ci    will result in undefined behavior if the destination texture image
4575bd8deadSopenharmony_ci    level is also bound to the selected read buffer (see section 4.3.1)
4585bd8deadSopenharmony_ci    of the read framebuffer. This situation is discussed in more detail
4595bd8deadSopenharmony_ci    in the description of feedback loops in section 4.4.4.
4605bd8deadSopenharmony_ci
4615bd8deadSopenharmony_ci    Modify Section 3.7.3, "Compressed Texture Images"
4625bd8deadSopenharmony_ci
4635bd8deadSopenharmony_ci    Replace the second paragraph:
4645bd8deadSopenharmony_ci    
4655bd8deadSopenharmony_ci    The commands
4665bd8deadSopenharmony_ci
4675bd8deadSopenharmony_ci        void CompressedTexImage2D(enum target, int level,
4685bd8deadSopenharmony_ci                                  enum internalformat, sizei width,
4695bd8deadSopenharmony_ci                                  sizei height, int border,
4705bd8deadSopenharmony_ci                                  sizei imageSize, const void *data);
4715bd8deadSopenharmony_ci        void CompressedTexImage3DNV(enum target, int level,
4725bd8deadSopenharmony_ci                                    enum internalformat, sizei width,
4735bd8deadSopenharmony_ci                                    sizei height, sizei depth,
4745bd8deadSopenharmony_ci                                    int border, sizei imageSize,
4755bd8deadSopenharmony_ci                                    const void *data);
4765bd8deadSopenharmony_ci
4775bd8deadSopenharmony_ci    define two- and three-dimensional texture images, respectively, with
4785bd8deadSopenharmony_ci    incoming data stored in a compressed image format. The <target>,
4795bd8deadSopenharmony_ci    <level>, <internalformat>, <width>, <height>, <depth>, and <border>
4805bd8deadSopenharmony_ci    parameters have the same meaning as in TexImage2D and TexImage3DNV.
4815bd8deadSopenharmony_ci    <data> refers to compressed image data stored in the compressed
4825bd8deadSopenharmony_ci    image format corresponding to <internalformat>. If a pixel unpack
4835bd8deadSopenharmony_ci    buffer is bound (as indicated by a non-zero value of PIXEL_UNPACK_-
4845bd8deadSopenharmony_ci    BUFFER_BINDING), <data> is an offset into the pixel unpack buffer
4855bd8deadSopenharmony_ci    and the compressed data is read from the buffer relative to this
4865bd8deadSopenharmony_ci    offset; otherwise, data is a pointer to client memory and the
4875bd8deadSopenharmony_ci    compressed data is read from client memory relative to the pointer.
4885bd8deadSopenharmony_ci
4895bd8deadSopenharmony_ci
4905bd8deadSopenharmony_ci    Replace fifth through the seventh paragraph of 3.7.3:
4915bd8deadSopenharmony_ci
4925bd8deadSopenharmony_ci    Any restrictions imposed by specific compressed internal formats
4935bd8deadSopenharmony_ci    will be invariant with respect to image contents, meaning that if
4945bd8deadSopenharmony_ci    the GL accepts and stores a texture image in compressed form,
4955bd8deadSopenharmony_ci    CompressedTexImage2D or CompressedTexImage3DNV will accept any
4965bd8deadSopenharmony_ci    properly encoded compressed texture image of the same width, height,
4975bd8deadSopenharmony_ci    compressed image size, and compressed internal format for storage at
4985bd8deadSopenharmony_ci    the same texture level.
4995bd8deadSopenharmony_ci
5005bd8deadSopenharmony_ci    Respecifying Subimages of Compressed Textures
5015bd8deadSopenharmony_ci
5025bd8deadSopenharmony_ci    The commands
5035bd8deadSopenharmony_ci
5045bd8deadSopenharmony_ci        void CompressedTexSubImage2D(enum target, int level, int xoffset,
5055bd8deadSopenharmony_ci                                    int yoffset, sizei width, sizei height,
5065bd8deadSopenharmony_ci                                    enum format, sizei imageSize, void *data);
5075bd8deadSopenharmony_ci        void CompressedTexSubImage3DNV(enum target, int level, int xoffset,
5085bd8deadSopenharmony_ci                                       int yoffset, int zoffset, sizei width,
5095bd8deadSopenharmony_ci                                       sizei height, sizei depth,
5105bd8deadSopenharmony_ci                                       enum format, sizei imageSize,
5115bd8deadSopenharmony_ci                                       const void *data);
5125bd8deadSopenharmony_ci
5135bd8deadSopenharmony_ci    respecify only a rectangular region of an existing texel array, with
5145bd8deadSopenharmony_ci    incoming data stored in a known compressed image format. The
5155bd8deadSopenharmony_ci    <target>, <level>, <xoffset>, <yoffset>, <zoffset>, <width>,
5165bd8deadSopenharmony_ci    <height>, <depth>, and <format> parameters have the same meaning as
5175bd8deadSopenharmony_ci    in TexSubImage2D and TexSubImage3DNV. data points to compressed
5185bd8deadSopenharmony_ci    image data stored in the compressed image format corresponding to
5195bd8deadSopenharmony_ci    <format>.
5205bd8deadSopenharmony_ci
5215bd8deadSopenharmony_ci    The image pointed to by <data> and the <imageSize> parameter are
5225bd8deadSopenharmony_ci    interpreted as though they were provided to CompressedTexImage2D and
5235bd8deadSopenharmony_ci    CompressedTexImage3DNV. These commands do not provide for image
5245bd8deadSopenharmony_ci    format conversion, so an INVALID_OPERATION error results if <format>
5255bd8deadSopenharmony_ci    does not match the internal format of the texture image being
5265bd8deadSopenharmony_ci    modified. If the <imageSize> parameter is not consistent with the
5275bd8deadSopenharmony_ci    format, dimensions, and contents of the compressed image (too little
5285bd8deadSopenharmony_ci    or too much data), an INVALID_VALUE error results.
5295bd8deadSopenharmony_ci    
5305bd8deadSopenharmony_ci
5315bd8deadSopenharmony_ci    Replace the last two paragraphs of section 3.7.3:
5325bd8deadSopenharmony_ci
5335bd8deadSopenharmony_ci    Any restrictions imposed by specific compressed internal formats
5345bd8deadSopenharmony_ci    will be invariant with respect to image contents, meaning that if GL
5355bd8deadSopenharmony_ci    accepts and stores a texture image in compressed form, Compressed-
5365bd8deadSopenharmony_ci    TexSubImage2D or CompressedTexSubImage3DNV will accept any properly
5375bd8deadSopenharmony_ci    encoded compressed texture image of the same width, height,
5385bd8deadSopenharmony_ci    compressed image size, and compressed internal format for storage at
5395bd8deadSopenharmony_ci    the same texture level.
5405bd8deadSopenharmony_ci
5415bd8deadSopenharmony_ci    Calling CompressedTexSubImage2D or CompressedTexSubImage3DNV will
5425bd8deadSopenharmony_ci    result in an INVALID_OPERATION error if <xoffset>, <yoffset>, or
5435bd8deadSopenharmony_ci    <zoffset> are not equal to zero, or if <width>, <height>, and
5445bd8deadSopenharmony_ci    <depth> do not match the dimensions of the texture level. These
5455bd8deadSopenharmony_ci    restrictions may be relaxed for specific compressed internal formats
5465bd8deadSopenharmony_ci    whose images are easily modified.
5475bd8deadSopenharmony_ci
5485bd8deadSopenharmony_ci    Modify Section 3.7.10, "Texture Completeness and Non-Power-Of-Two
5495bd8deadSopenharmony_ci    Textures"
5505bd8deadSopenharmony_ci
5515bd8deadSopenharmony_ci    (modify second paragraph)
5525bd8deadSopenharmony_ci
5535bd8deadSopenharmony_ci    A two-dimensional texture or two-dimensional texture array is
5545bd8deadSopenharmony_ci    complete if the following conditions all hold true:
5555bd8deadSopenharmony_ci
5565bd8deadSopenharmony_ci    Modify Section 3.7.11, "Mipmap Generation"
5575bd8deadSopenharmony_ci
5585bd8deadSopenharmony_ci    (modify first paragraph)
5595bd8deadSopenharmony_ci
5605bd8deadSopenharmony_ci    Mipmaps can be generated with the command
5615bd8deadSopenharmony_ci
5625bd8deadSopenharmony_ci        void GenerateMipmap(enum target);
5635bd8deadSopenharmony_ci
5645bd8deadSopenharmony_ci    where <target> is the target, which muct be TEXTURE_2D,
5655bd8deadSopenharmony_ci    TEXTURE_2D_ARRAY_NV, or TEXTURE_CUBE_MAP.
5665bd8deadSopenharmony_ci
5675bd8deadSopenharmony_ci    Modify Section 3.7.13, "Texture Objects"
5685bd8deadSopenharmony_ci
5695bd8deadSopenharmony_ci    In addition to the default textures TEXTURE_2D,
5705bd8deadSopenharmony_ci    TEXTURE_2D_ARRAY_NV, and TEXTURE_CUBE_MAP, named two-dimensional,
5715bd8deadSopenharmony_ci    two-dimensional array, and cube map texture objects can be created
5725bd8deadSopenharmony_ci    and operated upon.  The name space for texture objects is the
5735bd8deadSopenharmony_ci    unsigned integers, with zero reserved by the GL.
5745bd8deadSopenharmony_ci
5755bd8deadSopenharmony_ci    A texture object is created by binding an unused name to
5765bd8deadSopenharmony_ci    TEXTURE_2D, TEXTURE_2D_ARRAY_NV, or TEXTURE_CUBE_MAP. The binding
5775bd8deadSopenharmony_ci    is effected by calling
5785bd8deadSopenharmony_ci
5795bd8deadSopenharmony_ci        void BindTexture(enum target, uint texture);
5805bd8deadSopenharmony_ci
5815bd8deadSopenharmony_ci    with <target> set to the desired texture target and <texture> set
5825bd8deadSopenharmony_ci    to the unused name. The resulting texture object is a new state
5835bd8deadSopenharmony_ci    vector, comprising all the state values listed in section 3.7.12,
5845bd8deadSopenharmony_ci    set to the same initial values. If the new texture object is bound
5855bd8deadSopenharmony_ci    to TEXTURE_2D, TEXTURE_2D_ARRAY_NV, or TEXTURE_CUBE_MAP, it is and
5865bd8deadSopenharmony_ci    remains a two-dimensional, two-dimensional array, or cube map
5875bd8deadSopenharmony_ci    texture respectively until it is deleted.
5885bd8deadSopenharmony_ci
5895bd8deadSopenharmony_ci    BindTexture may also be used to bind an existing texture object to
5905bd8deadSopenharmony_ci    TEXTURE_2D, TEXTURE_2D_ARRAY_NV, or TEXTURE_CUBE_MAP. The error
5915bd8deadSopenharmony_ci    INVALID_OPERATION is generated if an attempt is made to bind a
5925bd8deadSopenharmony_ci    texture object of different dimensionality than the specified
5935bd8deadSopenharmony_ci    target. If the bind is successful no change is made to the state
5945bd8deadSopenharmony_ci    of the bound texture object, and any previous binding to target is
5955bd8deadSopenharmony_ci    broken.  While a texture object is bound, GL operations on the
5965bd8deadSopenharmony_ci    target to which it is bound affect the bound object, and queries
5975bd8deadSopenharmony_ci    of the target to which it is bound return state from the bound
5985bd8deadSopenharmony_ci    object.
5995bd8deadSopenharmony_ci
6005bd8deadSopenharmony_ci    In the initial state, TEXTURE_2D, TEXTURE_2D_ARRAY_NV, and
6015bd8deadSopenharmony_ci    TEXTURE_CUBE_MAP have two-dimensional, two-dimensional array, and
6025bd8deadSopenharmony_ci    cube map texture state vectors respectively associated with them.
6035bd8deadSopenharmony_ci    In order that access to these initial textures not be lost, they
6045bd8deadSopenharmony_ci    are treated as texture objects all of whose names are 0. The
6055bd8deadSopenharmony_ci    initial two-dimensional, two-dimensional array, and cube map
6065bd8deadSopenharmony_ci    texture are therefore operated upon, queried, and applied as
6075bd8deadSopenharmony_ci    TEXTURE_2D, TEXTURE_2D_ARRAY_NV, or TEXTURE_CUBE_MAP respectively
6085bd8deadSopenharmony_ci    while 0 is bound to the corresponding targets.
6095bd8deadSopenharmony_ci
6105bd8deadSopenharmony_ci    Texture objects are deleted by calling
6115bd8deadSopenharmony_ci
6125bd8deadSopenharmony_ci        void DeleteTextures(sizei n, uint *textures);
6135bd8deadSopenharmony_ci
6145bd8deadSopenharmony_ci    <textures> contains <n> names of texture objects to be deleted.
6155bd8deadSopenharmony_ci    After a texture object is deleted, it has no contents or
6165bd8deadSopenharmony_ci    dimensionality, and its name is again unused. If a texture that is
6175bd8deadSopenharmony_ci    currently bound to one of the targets TEXTURE_2D,
6185bd8deadSopenharmony_ci    TEXTURE_2D_ARRAY_NV, or TEXTURE_CUBE_MAP is deleted, it is as
6195bd8deadSopenharmony_ci    though BindTexture had been executed with the same target and
6205bd8deadSopenharmony_ci    texture zero. Unused names in textures are silently ignored, as is
6215bd8deadSopenharmony_ci    the value zero.
6225bd8deadSopenharmony_ci
6235bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL ES 2.0.25 Specification
6245bd8deadSopenharmony_ci
6255bd8deadSopenharmony_ci    Modify Section 4.3, "Reading Pixels"
6265bd8deadSopenharmony_ci
6275bd8deadSopenharmony_ci    Pixels may be read from the framebuffer to client memory using the
6285bd8deadSopenharmony_ci    ReadPixels commands, as described below. Pixels may also be copied
6295bd8deadSopenharmony_ci    from client memory or the framebuffer to texture images in the GL
6305bd8deadSopenharmony_ci    using the CopyTexImage2D, CopyTexSubImage2D, and
6315bd8deadSopenharmony_ci    CopyTexSubImage3DNV commands, as described in section 3.7.2.
6325bd8deadSopenharmony_ci
6335bd8deadSopenharmony_ci    Modify Section 4.4.3, "Renderbuffer Objects"
6345bd8deadSopenharmony_ci
6355bd8deadSopenharmony_ci    (modify paragraph following "Attaching Texture Images to a
6365bd8deadSopenharmony_ci     Framebuffer")
6375bd8deadSopenharmony_ci
6385bd8deadSopenharmony_ci    OpenGL ES supports copying the rendered contents of the
6395bd8deadSopenharmony_ci    framebuffer into the images of a texture object through the use of
6405bd8deadSopenharmony_ci    the routines CopyTexImage2D, CopyTexSubImage2D, and
6415bd8deadSopenharmony_ci    CopyTexSubImage3DNV. Additionally, OpenGL ES supports rendering
6425bd8deadSopenharmony_ci    directly into the images of a texture object.
6435bd8deadSopenharmony_ci
6445bd8deadSopenharmony_ci    (add the following to the end of the section)
6455bd8deadSopenharmony_ci
6465bd8deadSopenharmony_ci    The command
6475bd8deadSopenharmony_ci
6485bd8deadSopenharmony_ci      void FramebufferTextureLayerNV(enum target, enum attachment,
6495bd8deadSopenharmony_ci                                     uint texture, int level, int layer);
6505bd8deadSopenharmony_ci
6515bd8deadSopenharmony_ci    operates similarly to FramebufferTexture2D, except that it
6525bd8deadSopenharmony_ci    attaches a single layer of a two-dimensional array texture level.
6535bd8deadSopenharmony_ci
6545bd8deadSopenharmony_ci    <layer> specifies the layer of the two-dimensional image within
6555bd8deadSopenharmony_ci    <texture>. An INVALID_VALUE error is generated if <layer> is
6565bd8deadSopenharmony_ci    larger than the value of MAX_ARRAY_TEXTURE_LAYERS_NV minus one.
6575bd8deadSopenharmony_ci    The error INVALID_VALUE is generated if <texture> is non-zero and
6585bd8deadSopenharmony_ci    <layer> is negative.
6595bd8deadSopenharmony_ci
6605bd8deadSopenharmony_ci    <level> must be greater than or equal to zero and no larger than
6615bd8deadSopenharmony_ci    log2 of the value of MAX_TEXTURE_SIZE. Otherwise, an INVALID_VALUE
6625bd8deadSopenharmony_ci    error is generated.
6635bd8deadSopenharmony_ci
6645bd8deadSopenharmony_ci    The error INVALID_OPERATION is generated if <texture> is non-zero
6655bd8deadSopenharmony_ci    and is not the name of a two-dimensional array texture. Unlike
6665bd8deadSopenharmony_ci    FramebufferTexture2D, no <textarget> parameter is accepted.
6675bd8deadSopenharmony_ci
6685bd8deadSopenharmony_ci    If <texture> is non-zero and the command does not result in an
6695bd8deadSopenharmony_ci    error, the framebuffer attachment state corresponding to
6705bd8deadSopenharmony_ci    <attachment> is updated as in FramebufferTexture2D, except that
6715bd8deadSopenharmony_ci    the value of FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_NV is set to
6725bd8deadSopenharmony_ci    <layer>.
6735bd8deadSopenharmony_ci
6745bd8deadSopenharmony_ci    Modify Section 4.4.5, "Framebuffer Completeness"
6755bd8deadSopenharmony_ci
6765bd8deadSopenharmony_ci    (modify fourth bullet of actions that may change the framebuffer
6775bd8deadSopenharmony_ci     completeness)
6785bd8deadSopenharmony_ci
6795bd8deadSopenharmony_ci      * Changing the width, height, or internal format of a texture
6805bd8deadSopenharmony_ci        image that is attached to the framebuffer by calling
6815bd8deadSopenharmony_ci        TexImage2D, CopyTexImage2D, CompressedTexImage2D,
6825bd8deadSopenharmony_ci        TexImage3DNV, or CompressedTexImage3DNV.
6835bd8deadSopenharmony_ci
6845bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL ES 2.0.25 Specification
6855bd8deadSopenharmony_ci
6865bd8deadSopenharmony_ci    Modify Section 6.1.3, "Enumerated Queries"
6875bd8deadSopenharmony_ci
6885bd8deadSopenharmony_ci    (modify first paragraph)
6895bd8deadSopenharmony_ci
6905bd8deadSopenharmony_ci    The command
6915bd8deadSopenharmony_ci
6925bd8deadSopenharmony_ci        void GetTexParameter{if}v(enum target, enum value, T data);
6935bd8deadSopenharmony_ci
6945bd8deadSopenharmony_ci    returns information about <target>, which may be
6955bd8deadSopenharmony_ci    one of TEXTURE_2D, TEXTURE_2D_ARRAY, or TEXTURE_CUBE_MAP,
6965bd8deadSopenharmony_ci    indicating the currently bound two-dimensional, two-dimensional
6975bd8deadSopenharmony_ci    array, or cube map texture object.
6985bd8deadSopenharmony_ci
6995bd8deadSopenharmony_ci    (add the following item after "If the value of
7005bd8deadSopenharmony_ci     FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is TEXTURE, then")
7015bd8deadSopenharmony_ci
7025bd8deadSopenharmony_ci      * If <pname> is FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_NV and the
7035bd8deadSopenharmony_ci        texture object named FRAMEBUFFER_ATTACHMENT_OBJECT_NAME is a
7045bd8deadSopenharmony_ci        two-dimensional array texture, then <params> will contain the
7055bd8deadSopenharmony_ci        number of texture layer attached to the attachment point.
7065bd8deadSopenharmony_ci        Otherwise, <params> will contain the value zero.
7075bd8deadSopenharmony_ci
7085bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL ES Shading Language Specification
7095bd8deadSopenharmony_ci
7105bd8deadSopenharmony_ci    Add the following to the table of basic types in section 4.1:
7115bd8deadSopenharmony_ci
7125bd8deadSopenharmony_ci        sampler2DArrayNV   a handle for accessing a 2D array texture
7135bd8deadSopenharmony_ci
7145bd8deadSopenharmony_ciAdditions to Chapter 8 of the OpenGL ES Shading Language Specification
7155bd8deadSopenharmony_ci
7165bd8deadSopenharmony_ci    The built-in texture lookup functions texture2DArrayNV and
7175bd8deadSopenharmony_ci    texture2DArrayLodNV are optional, and must be enabled by
7185bd8deadSopenharmony_ci
7195bd8deadSopenharmony_ci        #extension GL_NV_texture_array : enable
7205bd8deadSopenharmony_ci
7215bd8deadSopenharmony_ci    before being used.
7225bd8deadSopenharmony_ci
7235bd8deadSopenharmony_ci    Syntax:
7245bd8deadSopenharmony_ci
7255bd8deadSopenharmony_ci        vec4 texture2DArrayNV(sampler2DArrayNV sampler, vec3 coord [, float bias])
7265bd8deadSopenharmony_ci        vec4 texture2DArrayLodNV(sampler2DArrayNV sampler, vec3 coord, float lod)
7275bd8deadSopenharmony_ci
7285bd8deadSopenharmony_ci    Description:
7295bd8deadSopenharmony_ci
7305bd8deadSopenharmony_ci    Use the first two elements (coord.s, coord.t) of texture
7315bd8deadSopenharmony_ci    coordinate coord to do a texture lookup in the layer indicated by
7325bd8deadSopenharmony_ci    the third coordinate (coord.p) of the 2D texture array currently
7335bd8deadSopenharmony_ci    bound to sampler. The layer to access is computed by layer =
7345bd8deadSopenharmony_ci    max (0, min(d - 1, floor (coord.p + 0.5)) where 'd' is the depth
7355bd8deadSopenharmony_ci    of the texture array.
7365bd8deadSopenharmony_ci
7375bd8deadSopenharmony_ciInteractions with OES_texture_3D
7385bd8deadSopenharmony_ci
7395bd8deadSopenharmony_ci    FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_NV is an alias for the
7405bd8deadSopenharmony_ci    FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES token provided in
7415bd8deadSopenharmony_ci    OES_texture_3D. This extension generalizes the notion of
7425bd8deadSopenharmony_ci    "<zoffset>" to include layers of an array texture.
7435bd8deadSopenharmony_ci
7445bd8deadSopenharmony_ci    If OES_texture_3D is supported, descriptions of TexImage3DNV,
7455bd8deadSopenharmony_ci    TexSubImage3DNV, CopyTexSubImage3DNV, CompressedTexImage3DNV, and
7465bd8deadSopenharmony_ci    CompressedTexSubImage3DNV should be merged with the *OES
7475bd8deadSopenharmony_ci    counterparts added by that extension and should be considered
7485bd8deadSopenharmony_ci    equivalents to the OES counterparts.
7495bd8deadSopenharmony_ci
7505bd8deadSopenharmony_ciInteractions with OES_depth_texture
7515bd8deadSopenharmony_ci
7525bd8deadSopenharmony_ci    If OES_depth_texture is not supported, all references to depth
7535bd8deadSopenharmony_ci    texture data should be ignored.
7545bd8deadSopenharmony_ci
7555bd8deadSopenharmony_ciInteractions with OES_packed_depth_stencil
7565bd8deadSopenharmony_ci
7575bd8deadSopenharmony_ci    If OES_packed_depth_stencil is not supported, all references to
7585bd8deadSopenharmony_ci    stencil texture data should be ignored.
7595bd8deadSopenharmony_ci
7605bd8deadSopenharmony_ciInteractions with OES_texture_npot and NV_texture_npot_2D_mipmap
7615bd8deadSopenharmony_ci
7625bd8deadSopenharmony_ci    If either OES_texture_npot or NV_texture_npot_2D_mipmap are
7635bd8deadSopenharmony_ci    supported, ignore INVALID_VALUE error generation by TexImage3DNV
7645bd8deadSopenharmony_ci    when level is greater than zero and width or height are non-power-
7655bd8deadSopenharmony_ci    of-two.
7665bd8deadSopenharmony_ci
7675bd8deadSopenharmony_ciInteractions with NV_pixel_buffer_object
7685bd8deadSopenharmony_ci
7695bd8deadSopenharmony_ci    If NV_pixel_buffer_object is not supported, ignore all references to
7705bd8deadSopenharmony_ci    non-zero unpack buffer objects and corresponding behavior.
7715bd8deadSopenharmony_ci
7725bd8deadSopenharmony_ciInteractions with NV_framebuffer_blit
7735bd8deadSopenharmony_ci
7745bd8deadSopenharmony_ci    If NV_framebuffer_blit is not supported, replace the reference to
7755bd8deadSopenharmony_ci    READ_FRAMEBUFFER_BINDING_NV in section 3.7.2 to FRAMEBUFFER_BINDING.
7765bd8deadSopenharmony_ci
7775bd8deadSopenharmony_ciErrors
7785bd8deadSopenharmony_ci
7795bd8deadSopenharmony_ci    None.
7805bd8deadSopenharmony_ci
7815bd8deadSopenharmony_ciNew State
7825bd8deadSopenharmony_ci
7835bd8deadSopenharmony_ci                                                 Initial
7845bd8deadSopenharmony_ci    Get Value                   Type Get Command  Value  Description
7855bd8deadSopenharmony_ci    --------------------------- ---- -----------  -----  -------------------------------------------
7865bd8deadSopenharmony_ci    TEXTURE_BINDING_2D_ARRAY_NV  Z+  GetIntegerv    0    texture object bound to TEXTURE_2D_ARRAY_NV
7875bd8deadSopenharmony_ci
7885bd8deadSopenharmony_ciNew Implementation Dependent State
7895bd8deadSopenharmony_ci
7905bd8deadSopenharmony_ci
7915bd8deadSopenharmony_ci                                                 Minimum
7925bd8deadSopenharmony_ci    Get Value                   Type Get Command  Value  Description
7935bd8deadSopenharmony_ci    --------------------------- ---- -----------  -----  ------------------------------------------
7945bd8deadSopenharmony_ci    MAX_ARRAY_TEXTURE_LAYERS_NV  Z+  GetIntegerv    64   maximum number of layers for texture array
7955bd8deadSopenharmony_ci
7965bd8deadSopenharmony_ciIssues
7975bd8deadSopenharmony_ci
7985bd8deadSopenharmony_ci    None
7995bd8deadSopenharmony_ci
8005bd8deadSopenharmony_ciRevision History
8015bd8deadSopenharmony_ci
8025bd8deadSopenharmony_ci    Rev.    Date        Author       Changes
8035bd8deadSopenharmony_ci    ----   --------     ---------    -------------------------------------
8045bd8deadSopenharmony_ci     4     25 Sep 2012  groth        Minor typographical fixes. fbo_blit interaction
8055bd8deadSopenharmony_ci     3     13 Sep 2012  groth        Added missing suffixes. Removed tex_3d
8065bd8deadSopenharmony_ci                                     language. Added more interactions.
8075bd8deadSopenharmony_ci                                     Clarified enumerated additions.
8085bd8deadSopenharmony_ci     2     05 Sep 2012  groth        Addition of lots of detail in chapter 3
8095bd8deadSopenharmony_ci                                     and interactions with other extensions
8105bd8deadSopenharmony_ci     1     30 Aug 2012  istewart     First revision, based of the
8115bd8deadSopenharmony_ci                                     EXT_texture_array specification.
8125bd8deadSopenharmony_ci
813