15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    EXT_texture
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_EXT_texture
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciVersion
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    $Date: 1996/04/05 19:17:03 $ $Revision: 1.21 $
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciNumber
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    4
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ciDependencies
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ci    None
205bd8deadSopenharmony_ci
215bd8deadSopenharmony_ciOverview
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ci    The original intention of this extension was simply to support various
245bd8deadSopenharmony_ci    numeric resolutions of color components in texture images.  While it
255bd8deadSopenharmony_ci    accomplishes this, it also accomplishes a larger task, that of
265bd8deadSopenharmony_ci    formalizing the notion of an internal format for images, corresponding
275bd8deadSopenharmony_ci    to the external format that already existed for image data in host
285bd8deadSopenharmony_ci    memory.  This notion of an internal image format will be used
295bd8deadSopenharmony_ci    extensively in later extensions, especially those concerned with pixel
305bd8deadSopenharmony_ci    manipulation.
315bd8deadSopenharmony_ci
325bd8deadSopenharmony_ci    The idea of an internal format is simple: rather than treating a
335bd8deadSopenharmony_ci    retained image as having 1, 2, 3, or 4 components, treat it as though
345bd8deadSopenharmony_ci    it has a specific format, such as LUMINANCE_ALPHA, or just ALPHA.  Then
355bd8deadSopenharmony_ci    define the semantics of the use of internal images with these formats in
365bd8deadSopenharmony_ci    a consistent way.  Because texture mapping is already defined in GL, the
375bd8deadSopenharmony_ci    semantics for internal-format images were chosen to match those of the 1,
385bd8deadSopenharmony_ci    2, 3, and 4 component internal images that already existed.  The new
395bd8deadSopenharmony_ci    semantics are a superset of the old ones, however, so this extension
405bd8deadSopenharmony_ci    adds capabilities to GL, as well as allowing internal resolutions to be
415bd8deadSopenharmony_ci    specified.
425bd8deadSopenharmony_ci
435bd8deadSopenharmony_ci    This extension also defines a robust method for applications to
445bd8deadSopenharmony_ci    determine what combinations of texture dimensions and resolutions are
455bd8deadSopenharmony_ci    supported by an implementation.  It also introduces a new texture
465bd8deadSopenharmony_ci    environment: REPLACE_EXT.
475bd8deadSopenharmony_ci
485bd8deadSopenharmony_ciNew Procedures and Functions
495bd8deadSopenharmony_ci
505bd8deadSopenharmony_ci    None
515bd8deadSopenharmony_ci
525bd8deadSopenharmony_ciNew Tokens
535bd8deadSopenharmony_ci
545bd8deadSopenharmony_ci    Accepted by the <components> parameter of TexImage1D and TexImage2D:
555bd8deadSopenharmony_ci
565bd8deadSopenharmony_ci        ALPHA4_EXT                       0x803B
575bd8deadSopenharmony_ci        ALPHA8_EXT                       0x803C
585bd8deadSopenharmony_ci        ALPHA12_EXT                      0x803D
595bd8deadSopenharmony_ci        ALPHA16_EXT                      0x803E
605bd8deadSopenharmony_ci        LUMINANCE4_EXT                   0x803F
615bd8deadSopenharmony_ci        LUMINANCE8_EXT                   0x8040
625bd8deadSopenharmony_ci        LUMINANCE12_EXT                  0x8041
635bd8deadSopenharmony_ci        LUMINANCE16_EXT                  0x8042
645bd8deadSopenharmony_ci        LUMINANCE4_ALPHA4_EXT            0x8043
655bd8deadSopenharmony_ci        LUMINANCE6_ALPHA2_EXT            0x8044
665bd8deadSopenharmony_ci        LUMINANCE8_ALPHA8_EXT            0x8045
675bd8deadSopenharmony_ci        LUMINANCE12_ALPHA4_EXT           0x8046
685bd8deadSopenharmony_ci        LUMINANCE12_ALPHA12_EXT          0x8047
695bd8deadSopenharmony_ci        LUMINANCE16_ALPHA16_EXT          0x8048
705bd8deadSopenharmony_ci        INTENSITY_EXT                    0x8049
715bd8deadSopenharmony_ci        INTENSITY4_EXT                   0x804A
725bd8deadSopenharmony_ci        INTENSITY8_EXT                   0x804B
735bd8deadSopenharmony_ci        INTENSITY12_EXT                  0x804C
745bd8deadSopenharmony_ci        INTENSITY16_EXT                  0x804D
755bd8deadSopenharmony_ci        RGB2_EXT                         0x804E
765bd8deadSopenharmony_ci        RGB4_EXT                         0x804F
775bd8deadSopenharmony_ci        RGB5_EXT                         0x8050
785bd8deadSopenharmony_ci        RGB8_EXT                         0x8051
795bd8deadSopenharmony_ci        RGB10_EXT                        0x8052
805bd8deadSopenharmony_ci        RGB12_EXT                        0x8053
815bd8deadSopenharmony_ci        RGB16_EXT                        0x8054
825bd8deadSopenharmony_ci        RGBA2_EXT                        0x8055
835bd8deadSopenharmony_ci        RGBA4_EXT                        0x8056
845bd8deadSopenharmony_ci        RGB5_A1_EXT                      0x8057
855bd8deadSopenharmony_ci        RGBA8_EXT                        0x8058
865bd8deadSopenharmony_ci        RGB10_A2_EXT                     0x8059
875bd8deadSopenharmony_ci        RGBA12_EXT                       0x805A
885bd8deadSopenharmony_ci        RGBA16_EXT                       0x805B
895bd8deadSopenharmony_ci
905bd8deadSopenharmony_ci    Accepted by the <pname> parameters of GetTexLevelParameteriv and
915bd8deadSopenharmony_ci    GetTexLevelParameterfv:
925bd8deadSopenharmony_ci
935bd8deadSopenharmony_ci        TEXTURE_RED_SIZE_EXT             0x805C
945bd8deadSopenharmony_ci        TEXTURE_GREEN_SIZE_EXT           0x805D
955bd8deadSopenharmony_ci        TEXTURE_BLUE_SIZE_EXT            0x805E
965bd8deadSopenharmony_ci        TEXTURE_ALPHA_SIZE_EXT           0x805F
975bd8deadSopenharmony_ci        TEXTURE_LUMINANCE_SIZE_EXT       0x8060
985bd8deadSopenharmony_ci        TEXTURE_INTENSITY_SIZE_EXT       0x8061
995bd8deadSopenharmony_ci
1005bd8deadSopenharmony_ci    Accepted by the <params> parameter of TexEnvf, TexEnvi, TexEnvfv, and
1015bd8deadSopenharmony_ci    TexEnvfi when the <pname> parameter value is
1025bd8deadSopenharmony_ci    GL_TEXTURE_ENV_MODE
1035bd8deadSopenharmony_ci
1045bd8deadSopenharmony_ci        REPLACE_EXT                      0x8062
1055bd8deadSopenharmony_ci
1065bd8deadSopenharmony_ci    Accepted by the <target> parameters of TexImage1D,
1075bd8deadSopenharmony_ci    GetTexLevelParameteriv, and GetTexLevelParameterfv:
1085bd8deadSopenharmony_ci
1095bd8deadSopenharmony_ci        PROXY_TEXTURE_1D_EXT             0x8063
1105bd8deadSopenharmony_ci
1115bd8deadSopenharmony_ci    Accepted by the <target> parameters of TexImage2D,
1125bd8deadSopenharmony_ci    GetTexLevelParameteriv, and GetTexLevelParameterfv:
1135bd8deadSopenharmony_ci
1145bd8deadSopenharmony_ci        PROXY_TEXTURE_2D_EXT             0x8064
1155bd8deadSopenharmony_ci
1165bd8deadSopenharmony_ciAdditions to Chapter 2 of the GL Specification (OpenGL Operation)
1175bd8deadSopenharmony_ci
1185bd8deadSopenharmony_ci    A new error token value, TEXTURE_TOO_LARGE_EXT, is defined and added to
1195bd8deadSopenharmony_ci    table 2.3:
1205bd8deadSopenharmony_ci
1215bd8deadSopenharmony_ci                                                                           Offending
1225bd8deadSopenharmony_ci                                                                           command
1235bd8deadSopenharmony_ci        Error                   Description                                ignored?
1245bd8deadSopenharmony_ci        -----                   -----------                                ---------
1255bd8deadSopenharmony_ci        INVALID_ENUM            enum argument out of range                 Yes
1265bd8deadSopenharmony_ci        INVALID_VALUE           Numeric argument out of range              Yes
1275bd8deadSopenharmony_ci        INVALID_OPERATION       Operation illegal in current state         Yes
1285bd8deadSopenharmony_ci        STACK_OVERFLOW          Command would cause a stack overflow       Yes
1295bd8deadSopenharmony_ci        STACK_UNDERFLOW         Command would cause a stack underflow      Yes
1305bd8deadSopenharmony_ci        TEXTURE_TOO_LARGE_EXT   The specified texture is too large         Yes
1315bd8deadSopenharmony_ci        OUT_OF_MEMORY           Not enough memory left to execute command  Unknown
1325bd8deadSopenharmony_ci
1335bd8deadSopenharmony_ci        Table 2.3: Summary of GL errors
1345bd8deadSopenharmony_ci
1355bd8deadSopenharmony_ci     and defined as follows:
1365bd8deadSopenharmony_ci
1375bd8deadSopenharmony_ci        TEXTURE_TOO_LARGE_EXT            0x8065
1385bd8deadSopenharmony_ci
1395bd8deadSopenharmony_ciAdditions to Chapter 3 of the GL Specification (Rasterization)
1405bd8deadSopenharmony_ci
1415bd8deadSopenharmony_ci    Many additional values can be specified for the <components> parameter
1425bd8deadSopenharmony_ci    of TexImage1D and TexImage2D.  The GL Specification indicates (in
1435bd8deadSopenharmony_ci    section 3.8) that only values 1, 2, 3, and 4 can be specified.  This
1445bd8deadSopenharmony_ci    extension defines semantics for the currently existing tokens ALPHA,
1455bd8deadSopenharmony_ci    RGB, RGBA, LUMINANCE, and LUMINANCE_ALPHA, and also defines semantics
1465bd8deadSopenharmony_ci    for many new tokens.  Each of the new tokens (except INTENSITY_EXT)
1475bd8deadSopenharmony_ci    indicates a desired storage resolution, as well as a base format.  These
1485bd8deadSopenharmony_ci    tokens are:
1495bd8deadSopenharmony_ci
1505bd8deadSopenharmony_ci                                                                Red     Green   Blue    Alpha   Luminance   Intensity
1515bd8deadSopenharmony_ci        Token name                      Base format             Bits    Bits    Bits    Bits    Bits        Bits
1525bd8deadSopenharmony_ci        ----------                      -----------             ----    ----    ----    ----    ----        ----
1535bd8deadSopenharmony_ci
1545bd8deadSopenharmony_ci        ALPHA4_EXT                      ALPHA                                             4
1555bd8deadSopenharmony_ci        ALPHA8_EXT                      ALPHA                                             8
1565bd8deadSopenharmony_ci        ALPHA12_EXT                     ALPHA                                            12
1575bd8deadSopenharmony_ci        ALPHA16_EXT                     ALPHA                                            16
1585bd8deadSopenharmony_ci        LUMINANCE4_EXT                  LUMINANCE                                                 4
1595bd8deadSopenharmony_ci        LUMINANCE8_EXT                  LUMINANCE                                                 8
1605bd8deadSopenharmony_ci        LUMINANCE12_EXT                 LUMINANCE                                                12
1615bd8deadSopenharmony_ci        LUMINANCE16_EXT                 LUMINANCE                                                16
1625bd8deadSopenharmony_ci        LUMINANCE4_ALPHA4_EXT           LUMINANCE_ALPHA                                   4       4
1635bd8deadSopenharmony_ci        LUMINANCE6_ALPHA2_EXT           LUMINANCE_ALPHA                                   2       6
1645bd8deadSopenharmony_ci        LUMINANCE8_ALPHA8_EXT           LUMINANCE_ALPHA                                   8       8
1655bd8deadSopenharmony_ci        LUMINANCE12_ALPHA4_EXT          LUMINANCE_ALPHA                                   4      12
1665bd8deadSopenharmony_ci        LUMINANCE12_ALPHA12_EXT         LUMINANCE_ALPHA                                  12      12
1675bd8deadSopenharmony_ci        LUMINANCE16_ALPHA16_EXT         LUMINANCE_ALPHA                                  16      16
1685bd8deadSopenharmony_ci        INTENSITY_EXT                   INTENSITY_EXT                                                        ?
1695bd8deadSopenharmony_ci        INTENSITY4_EXT                  INTENSITY_EXT                                                        4
1705bd8deadSopenharmony_ci        INTENSITY8_EXT                  INTENSITY_EXT                                                        8
1715bd8deadSopenharmony_ci        INTENSITY12_EXT                 INTENSITY_EXT                                                       12
1725bd8deadSopenharmony_ci        INTENSITY16_EXT                 INTENSITY_EXT                                                       16
1735bd8deadSopenharmony_ci        RGB2_EXT                        RGB                       2       2       2                
1745bd8deadSopenharmony_ci        RGB4_EXT                        RGB                       4       4       4                
1755bd8deadSopenharmony_ci        RGB5_EXT                        RGB                       5       5       5                
1765bd8deadSopenharmony_ci        RGB8_EXT                        RGB                       8       8       8                
1775bd8deadSopenharmony_ci        RGB10_EXT                       RGB                      10      10      10                
1785bd8deadSopenharmony_ci        RGB12_EXT                       RGB                      12      12      12                
1795bd8deadSopenharmony_ci        RGB16_EXT                       RGB                      16      16      16                
1805bd8deadSopenharmony_ci        RGBA2_EXT                       RGBA                      2       2       2       2        
1815bd8deadSopenharmony_ci        RGBA4_EXT                       RGBA                      4       4       4       4        
1825bd8deadSopenharmony_ci        RGB5_A1_EXT                     RGBA                      5       5       5       1        
1835bd8deadSopenharmony_ci        RGBA8_EXT                       RGBA                      8       8       8       8        
1845bd8deadSopenharmony_ci        RGB10_A2_EXT                    RGBA                     10      10      10       2        
1855bd8deadSopenharmony_ci        RGBA12_EXT                      RGBA                     12      12      12      12        
1865bd8deadSopenharmony_ci        RGBA16_EXT                      RGBA                     16      16      16      16        
1875bd8deadSopenharmony_ci
1885bd8deadSopenharmony_ci    All implementations of this extension support the base formats ALPHA,
1895bd8deadSopenharmony_ci    LUMINANCE, LUMINANCE_ALPHA, RGB, and RGBA.  All implementations also
1905bd8deadSopenharmony_ci    accept all the tokens in the table above, but may not allocate storage
1915bd8deadSopenharmony_ci    exactly equal to that indicated in the table.  Instead, storage is
1925bd8deadSopenharmony_ci    allocated to best match the resolutions in the table.  The determination
1935bd8deadSopenharmony_ci    of best match is left to the implementation.  Storage allocation for the
1945bd8deadSopenharmony_ci    base formats (as well as for formats "1", "2", "3", and "4") is an
1955bd8deadSopenharmony_ci    implementation dependent compromise of component resolution,
1965bd8deadSopenharmony_ci    performance, image size, and memory availability.
1975bd8deadSopenharmony_ci    
1985bd8deadSopenharmony_ci    It is acceptable for an implementation to vary its allocation of
1995bd8deadSopenharmony_ci    internal component resolution based on any TexImage1D or TexImage2D
2005bd8deadSopenharmony_ci    parameter, but the allocation must not be a function of any other
2015bd8deadSopenharmony_ci    factor, and cannot be changed once it is established.  In particular,
2025bd8deadSopenharmony_ci    allocations must be invariant -- the same allocation must be made each
2035bd8deadSopenharmony_ci    time a texture image is specified with the same parameter values.
2045bd8deadSopenharmony_ci    Provision is made for an application to determine what component
2055bd8deadSopenharmony_ci    resolutions are available without having to fully specify the texture
2065bd8deadSopenharmony_ci    (see below).
2075bd8deadSopenharmony_ci
2085bd8deadSopenharmony_ci    A set of mipmap arrays is incomplete (see the Mipmapping section of the
2095bd8deadSopenharmony_ci    GL Specification) if different internal formats are specified for arrays
2105bd8deadSopenharmony_ci    in the set, even if the resulting formats of the arrays are identical.
2115bd8deadSopenharmony_ci    An implementation can, however, report different component precisions
2125bd8deadSopenharmony_ci    for the arrays in the set, even if all were specified with the same
2135bd8deadSopenharmony_ci    internal format.  (The set of arrays will be complete in this case.)
2145bd8deadSopenharmony_ci
2155bd8deadSopenharmony_ci    The assignments of texture component values from color components
2165bd8deadSopenharmony_ci    "extracted" from the incoming image (see the discussion in section 3.8
2175bd8deadSopenharmony_ci    of the GL Specification) are defined by this new version of Table 3.6:
2185bd8deadSopenharmony_ci
2195bd8deadSopenharmony_ci        Base Internal Format    red     green   blue    alpha   luminance       intensity
2205bd8deadSopenharmony_ci        --------------------    ---     -----   ----    -----   ---------       ---------
2215bd8deadSopenharmony_ci
2225bd8deadSopenharmony_ci        ALPHA                                           A
2235bd8deadSopenharmony_ci        LUMINANCE                                               R
2245bd8deadSopenharmony_ci        LUMINANCE_ALPHA                                 A       R
2255bd8deadSopenharmony_ci        INTENSITY_EXT                                                           R
2265bd8deadSopenharmony_ci        RGB                     R       G       B
2275bd8deadSopenharmony_ci        RGBA                    R       G       B       A
2285bd8deadSopenharmony_ci
2295bd8deadSopenharmony_ci        Table 3.6: Correspondence of texture components to extracted
2305bd8deadSopenharmony_ci        R, G, B, and A values.
2315bd8deadSopenharmony_ci
2325bd8deadSopenharmony_ci    Texture components are assigned to Rt, Gt, Bt, and At.
2335bd8deadSopenharmony_ci    Table 3.8 (Texture functions) refers to these components.
2345bd8deadSopenharmony_ci    The assignments are defined by the following table:
2355bd8deadSopenharmony_ci
2365bd8deadSopenharmony_ci                                Texture Environment
2375bd8deadSopenharmony_ci                                -------------------
2385bd8deadSopenharmony_ci
2395bd8deadSopenharmony_ci        Base Texture Format     Rt      Gt      Bt      At
2405bd8deadSopenharmony_ci        -------------------     --      --      --      --
2415bd8deadSopenharmony_ci
2425bd8deadSopenharmony_ci        LUMINANCE               Lt      Lt      Lt      x
2435bd8deadSopenharmony_ci
2445bd8deadSopenharmony_ci        ALPHA                   x       x       x       At
2455bd8deadSopenharmony_ci
2465bd8deadSopenharmony_ci        INTENSITY_EXT           It      It      It      It
2475bd8deadSopenharmony_ci
2485bd8deadSopenharmony_ci        LUMINANCE_ALPHA         Lt      Lt      Lt      At
2495bd8deadSopenharmony_ci
2505bd8deadSopenharmony_ci        RGB                     Rt      Gt      Bt      x
2515bd8deadSopenharmony_ci
2525bd8deadSopenharmony_ci        RGBA                    Rt      Gt      Bt      At
2535bd8deadSopenharmony_ci
2545bd8deadSopenharmony_ci        Table ??: Mapping of Texture Components to Rt, Gt, Bt, At.
2555bd8deadSopenharmony_ci
2565bd8deadSopenharmony_ci    Where there appears an "x", the assignment is "don't care", since
2575bd8deadSopenharmony_ci    that component is not used by the texture environment.
2585bd8deadSopenharmony_ci
2595bd8deadSopenharmony_ci    This extension redefines the application of a texture to the color
2605bd8deadSopenharmony_ci    components of a fragment.  In particular, a new texture environment, REPLACE,
2615bd8deadSopenharmony_ci    and two new texture formats, ALPHA and INTENSITY_EXT, are included.
2625bd8deadSopenharmony_ci    Table 3.8 (Texture functions) of the GL
2635bd8deadSopenharmony_ci    Specification is replaced by the following table:
2645bd8deadSopenharmony_ci
2655bd8deadSopenharmony_ci                                Texture Environment
2665bd8deadSopenharmony_ci                                -------------------
2675bd8deadSopenharmony_ci
2685bd8deadSopenharmony_ci        Base Texture Format     REPLACE         MODULATE        BLEND                           DECAL
2695bd8deadSopenharmony_ci        -------------------     -------         --------        -----                           -----
2705bd8deadSopenharmony_ci
2715bd8deadSopenharmony_ci        LUMINANCE               Rv =    Rt      Rv = Rf * Rt    Rv = Rf * (1-Rt) + Rc * Rt      undefined
2725bd8deadSopenharmony_ci                                Gv =    Gt      Gv = Gf * Gt    Gv = Gf * (1-Gt) + Gc * Gt
2735bd8deadSopenharmony_ci                                Bv =    Bt      Bv = Bf * Bt    Bv = Bf * (1-Bt) + Bc * Bt
2745bd8deadSopenharmony_ci                                Av = Af         Av = Af         Av = Af
2755bd8deadSopenharmony_ci
2765bd8deadSopenharmony_ci        ALPHA                   Rv = Rf         Rv = Rf         Rv = Rf                         undefined
2775bd8deadSopenharmony_ci                                Gv = Gf         Gv = Gf         Gv = Gf
2785bd8deadSopenharmony_ci                                Bv = Bf         Bv = Bf         Bv = Bf
2795bd8deadSopenharmony_ci                                Av =    At      Av = Af * At    Av = Af * At
2805bd8deadSopenharmony_ci
2815bd8deadSopenharmony_ci        INTENSITY_EXT           Rv =    Rt      Rv = Rf * Rt    Rv = Rf * (1-Rt) + Rc * Rt      undefined
2825bd8deadSopenharmony_ci                                Gv =    Gt      Gv = Gf * Gt    Gv = Gf * (1-Gt) + Gc * Gt
2835bd8deadSopenharmony_ci                                Bv =    Bt      Bv = Bf * Bt    Bv = Bf * (1-Bt) + Bc * Bt
2845bd8deadSopenharmony_ci                                Av =    At      Av = Af * At    Av = Af * (1-At) + Ac * At
2855bd8deadSopenharmony_ci
2865bd8deadSopenharmony_ci        LUMINANCE_ALPHA         Rv =    Rt      Rv = Rf * Rt    Rv = Rf * (1-Rt) + Rc * Rt      undefined
2875bd8deadSopenharmony_ci                                Gv =    Gt      Gv = Gf * Gt    Gv = Gf * (1-Gt) + Gc * Gt
2885bd8deadSopenharmony_ci                                Bv =    Bt      Bv = Bf * Bt    Bv = Bf * (1-Bt) + Bc * Bt
2895bd8deadSopenharmony_ci                                Av =    At      Av = Af * At    Av = Af * At
2905bd8deadSopenharmony_ci
2915bd8deadSopenharmony_ci        RGB                     Rv =    Rt      Rv = Rf * Rt    Rv = Rf * (1-Rt) + Rc * Rt      Rv =    Rt
2925bd8deadSopenharmony_ci                                Gv =    Gt      Gv = Gf * Gt    Gv = Gf * (1-Gt) + Gc * Gt      Gv =    Gt
2935bd8deadSopenharmony_ci                                Bv =    Bt      Bv = Bf * Bt    Bv = Bf * (1-Bt) + Bc * Bt      Bv =    Bt
2945bd8deadSopenharmony_ci                                Av = Af         Av = Af         Av = Af                         Av = Af
2955bd8deadSopenharmony_ci
2965bd8deadSopenharmony_ci        RGBA                    Rv =    Rt      Rv = Rf * Rt    Rv = Rf * (1-Rt) + Rc * Rt      Rv = Rf * (1-At) + Rt * At
2975bd8deadSopenharmony_ci                                Gv =    Gt      Gv = Gf * Gt    Gv = Gf * (1-Gt) + Gc * Gt      Gv = Gf * (1-At) + Gt * At
2985bd8deadSopenharmony_ci                                Bv =    Bt      Bv = Bf * Bt    Bv = Bf * (1-Bt) + Bc * Bt      Bv = Bf * (1-At) + Bt * At
2995bd8deadSopenharmony_ci                                Av =    At      Av = Af * At    Av = Af * At                    Av = Af
3005bd8deadSopenharmony_ci
3015bd8deadSopenharmony_ci        Table 3.8: Texture functions.
3025bd8deadSopenharmony_ci
3035bd8deadSopenharmony_ci    Finally, for backward compatibility, the semantics of <components>
3045bd8deadSopenharmony_ci    values 1, 2, 3, and 4 are identical to those of LUMINANCE,
3055bd8deadSopenharmony_ci    LUMINANCE_ALPHA, RGB, and RGBA respectively.  The one exception is that
3065bd8deadSopenharmony_ci    the token values for 1, 2, 3, and 4 are not the same as the token values
3075bd8deadSopenharmony_ci    LUMINANCE, LUMINANCE_ALPHA, RGB, and RGBA.
3085bd8deadSopenharmony_ci
3095bd8deadSopenharmony_ci    Query support
3105bd8deadSopenharmony_ci    -------------
3115bd8deadSopenharmony_ci
3125bd8deadSopenharmony_ci    Alternate sets of partial per-level texture state are defined for
3135bd8deadSopenharmony_ci    the proxy textures PROXY_TEXTURE_1D_EXT and PROXY_TEXTURE_2D_EXT.
3145bd8deadSopenharmony_ci    Specifically, TEXTURE_WIDTH, TEXTURE_HEIGHT, TEXTURE_BORDER,
3155bd8deadSopenharmony_ci    TEXTURE_COMPONENTS, TEXTURE_RED_SIZE_EXT, TEXTURE_GREEN_SIZE_EXT,
3165bd8deadSopenharmony_ci    TEXTURE_BLUE_SIZE_EXT, TEXTURE_ALPHA_SIZE_EXT,
3175bd8deadSopenharmony_ci    TEXTURE_LUMINANCE_SIZE_EXT, and TEXTURE_INTENSITY_SIZE_EXT are
3185bd8deadSopenharmony_ci    maintained for proxy textures.  When TexImage2D is called with
3195bd8deadSopenharmony_ci    <target> set to PROXY_TEXTURE_2D_EXT, these proxy state values are
3205bd8deadSopenharmony_ci    always recomputed and updated, even if the texture is too large to
3215bd8deadSopenharmony_ci    actually be used.  If the texture is too large, all of these state
3225bd8deadSopenharmony_ci    variables are set to zero.  If the texture could be accommodated
3235bd8deadSopenharmony_ci    by TexImage2D called with <target> TEXTURE_2D, these values are
3245bd8deadSopenharmony_ci    set as though TEXTURE_2D were being defined.  All of these state
3255bd8deadSopenharmony_ci    value can be queried with GetTexLevelParameteriv or
3265bd8deadSopenharmony_ci    GetTexLevelParameterfv with <target> set to PROXY_TEXTURE_2D_EXT.
3275bd8deadSopenharmony_ci    Calling TexImage2D with <target> PROXY_TEXTURE_2D_EXT has no
3285bd8deadSopenharmony_ci    effect on the actual 2-dimensional texture or its state.
3295bd8deadSopenharmony_ci
3305bd8deadSopenharmony_ci    To determine the maximum array size for a mipmap texture, specify and
3315bd8deadSopenharmony_ci    query the proxy texture at the highest level that accurately reflects the
3325bd8deadSopenharmony_ci    aspect ratio of the desired level zero array.
3335bd8deadSopenharmony_ci
3345bd8deadSopenharmony_ci    There is no image associated with PROXY_TEXTURE_2D_EXT.  Therefore
3355bd8deadSopenharmony_ci    PROXY_TEXTURE_2D_EXT cannot be used as a texture, and its image must
3365bd8deadSopenharmony_ci    never be queried using GetTexImage.  (The error INVALID_ENUM results if
3375bd8deadSopenharmony_ci    this is attempted.)  Likewise, there is no nonlevel-related state
3385bd8deadSopenharmony_ci    associated with a proxy texture, so calling GetTexParameteriv or
3395bd8deadSopenharmony_ci    GetTexParameterfv with <target> PROXY_TEXTURE_2D_EXT results in the
3405bd8deadSopenharmony_ci    error INVALID_ENUM.
3415bd8deadSopenharmony_ci
3425bd8deadSopenharmony_ci    The proxy 1-dimensional texture behaves identically to the proxy
3435bd8deadSopenharmony_ci    2-dimensional texture, except that its state does not include
3445bd8deadSopenharmony_ci    TEXTURE_HEIGHT.
3455bd8deadSopenharmony_ci
3465bd8deadSopenharmony_ciAdditions to Chapter 4 of the GL Specification (Per-Fragment Operations
3475bd8deadSopenharmony_ciand the Framebuffer)
3485bd8deadSopenharmony_ci
3495bd8deadSopenharmony_ci    None
3505bd8deadSopenharmony_ci
3515bd8deadSopenharmony_ciAdditions to Chapter 5 of the GL Specification (Special Functions)
3525bd8deadSopenharmony_ci
3535bd8deadSopenharmony_ci    TexImage1D with a proxy target and TexImage2D with a proxy target
3545bd8deadSopenharmony_ci    are not included in display lists, but are instead executed
3555bd8deadSopenharmony_ci    immediately.
3565bd8deadSopenharmony_ci
3575bd8deadSopenharmony_ciAdditions to Chapter 6 of the GL Specification (State and State Requests)
3585bd8deadSopenharmony_ci
3595bd8deadSopenharmony_ci    GetTexLevelParameteriv, when called with <pname> TEXTURE_COMPONENTS,
3605bd8deadSopenharmony_ci    returns the value of the <components> state variable as specified by the
3615bd8deadSopenharmony_ci    application.  This remains true even if the actual internal format
3625bd8deadSopenharmony_ci    matches that of another token.
3635bd8deadSopenharmony_ci
3645bd8deadSopenharmony_ci    GetTexLevelParameteriv, when called with <pname> TEXTURE_RED_SIZE_EXT,
3655bd8deadSopenharmony_ci    TEXTURE_GREEN_SIZE_EXT, TEXTURE_BLUE_SIZE_EXT, TEXTURE_ALPHA_SIZE_EXT,
3665bd8deadSopenharmony_ci    TEXTURE_LUMINANCE_SIZE_EXT, or TEXTURE_INTENSITY_SIZE_EXT returns the
3675bd8deadSopenharmony_ci    actual number of bits of internal storage for red, green, blue, alpha,
3685bd8deadSopenharmony_ci    luminance, or intensity.  This value may not match the value of the
3695bd8deadSopenharmony_ci    specified internal format.
3705bd8deadSopenharmony_ci
3715bd8deadSopenharmony_ci    GetTexImage continues to operate as though ReadPixels were called with
3725bd8deadSopenharmony_ci    the texture image as the framebuffer.  The assignments of texture
3735bd8deadSopenharmony_ci    component values to the initial R, G, B, and A values of the read-back
3745bd8deadSopenharmony_ci    texel (prior to PixelTransfer and PixelStorage operations) are:
3755bd8deadSopenharmony_ci
3765bd8deadSopenharmony_ci        Base Internal Format    R               G       B       A
3775bd8deadSopenharmony_ci        --------------------    -               -       -       -
3785bd8deadSopenharmony_ci
3795bd8deadSopenharmony_ci        ALPHA                   0.0             0.0     0.0     alpha
3805bd8deadSopenharmony_ci        LUMINANCE               luminance       0.0     0.0     0.0                                             
3815bd8deadSopenharmony_ci        LUMINANCE_ALPHA         luminance       0.0     0.0     alpha
3825bd8deadSopenharmony_ci        INTENSITY_EXT           intensity       0.0     0.0     0.0
3835bd8deadSopenharmony_ci        RGB                     red             green   blue    0.0
3845bd8deadSopenharmony_ci        RGBA                    red             green   blue    alpha
3855bd8deadSopenharmony_ci
3865bd8deadSopenharmony_ciAdditions to the GLX Specification
3875bd8deadSopenharmony_ci
3885bd8deadSopenharmony_ci    None
3895bd8deadSopenharmony_ci
3905bd8deadSopenharmony_ciGLX Protocol
3915bd8deadSopenharmony_ci
3925bd8deadSopenharmony_ci    None
3935bd8deadSopenharmony_ci
3945bd8deadSopenharmony_ciDependencies on EXT_abgr
3955bd8deadSopenharmony_ci
3965bd8deadSopenharmony_ci    Token ABGR_EXT cannot be used to specify internal texture image formats.
3975bd8deadSopenharmony_ci
3985bd8deadSopenharmony_ciErrors
3995bd8deadSopenharmony_ci
4005bd8deadSopenharmony_ci    The GL Specification requires that INVALID_VALUE be generated if any
4015bd8deadSopenharmony_ci    texture dimension is specified less than zero, greater than
4025bd8deadSopenharmony_ci    MAX_TEXTURE_SIZE, or with a value that cannot be represented as 2**k +
4035bd8deadSopenharmony_ci    2*border, for some integer k.  This extension eliminates the requirement
4045bd8deadSopenharmony_ci    that all dimensions be specified less than or equal to MAX_TEXTURE_SIZE,
4055bd8deadSopenharmony_ci    and replaces it with a new error token and error condition.
4065bd8deadSopenharmony_ci    INVALID_VALUE is generated if any texture dimension is specified less
4075bd8deadSopenharmony_ci    than zero, or with a value that cannot be represented as 2**k + 2*border.
4085bd8deadSopenharmony_ci    TEXTURE_TOO_LARGE_EXT is generated if the texture is too large to be
4095bd8deadSopenharmony_ci    accommodated, for whatever reason.  An implementation must specify
4105bd8deadSopenharmony_ci    MAX_TEXTURE_SIZE such that TEXTURE_TOO_LARGE_EXT is never generated if
4115bd8deadSopenharmony_ci    all the dimensions of the texture are less than or equal to
4125bd8deadSopenharmony_ci    MAX_TEXTURE_SIZE.  Also, TEXTURE_TOO_LARGE_EXT is never generated when
4135bd8deadSopenharmony_ci    the target is a proxy texture, such as PROXY_TEXTURE_1D_EXT or
4145bd8deadSopenharmony_ci    PROXY_TEXTURE_2D_EXT.
4155bd8deadSopenharmony_ci
4165bd8deadSopenharmony_ci    This change to the error semantics does not require that the major
4175bd8deadSopenharmony_ci    revision level be incremented, because the GL Specification allows for
4185bd8deadSopenharmony_ci    changes to error semantics (Section 2.5).
4195bd8deadSopenharmony_ci
4205bd8deadSopenharmony_ciNew State
4215bd8deadSopenharmony_ci
4225bd8deadSopenharmony_ci                                                                                        Initial
4235bd8deadSopenharmony_ci    Get Value                           Get Command             Type                    Value   Attrib
4245bd8deadSopenharmony_ci    ---------                           -----------             ----                    ------- ------
4255bd8deadSopenharmony_ci    TEXTURE_RED_SIZE_EXT                GetTexLevelParameteriv  2 x 2 x levels x Z+     0          -
4265bd8deadSopenharmony_ci    TEXTURE_GREEN_SIZE_EXT              GetTexLevelParameteriv  2 x 2 x levels x Z+     0          -
4275bd8deadSopenharmony_ci    TEXTURE_BLUE_SIZE_EXT               GetTexLevelParameteriv  2 x 2 x levels x Z+     0          -
4285bd8deadSopenharmony_ci    TEXTURE_ALPHA_SIZE_EXT              GetTexLevelParameteriv  2 x 2 x levels x Z+     0          -
4295bd8deadSopenharmony_ci    TEXTURE_LUMINANCE_SIZE_EXT          GetTexLevelParameteriv  2 x 2 x levels x Z+     0          -
4305bd8deadSopenharmony_ci    TEXTURE_INTENSITY_SIZE_EXT          GetTexLevelParameteriv  2 x 2 x levels x Z+     0          -
4315bd8deadSopenharmony_ci
4325bd8deadSopenharmony_ci    TEXTURE                             GetTexImage             2 x 1 x levels x I      null       -
4335bd8deadSopenharmony_ci    TEXTURE_WIDTH                       GetTexLevelParameteriv  2 x 2 x levels x Z+     0          -
4345bd8deadSopenharmony_ci    TEXTURE_HEIGHT                      GetTexLevelParameteriv  1 x 2 x levels x Z+     0          -
4355bd8deadSopenharmony_ci    TEXTURE_BORDER                      GetTexLevelParameteriv  2 x 2 x levels x Z+     0          -
4365bd8deadSopenharmony_ci    TEXTURE_COMPONENTS                  GetTexLevelParameteriv  2 x 2 x levels x Z42    1          -
4375bd8deadSopenharmony_ci
4385bd8deadSopenharmony_ciNew Implementation Dependent State
4395bd8deadSopenharmony_ci
4405bd8deadSopenharmony_ci    None
441