15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    APPLE_float_pixels
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_APPLE_float_pixels
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Geoff Stahl, Apple (gstahl 'at' apple.com)
125bd8deadSopenharmony_ci    Jeremy Sandmel, Apple (jsandmel 'at' apple.com)
135bd8deadSopenharmony_ci
145bd8deadSopenharmony_ciStatus
155bd8deadSopenharmony_ci
165bd8deadSopenharmony_ci    Shipping Mac OS X v10.2.3 (version 1.0)
175bd8deadSopenharmony_ci
185bd8deadSopenharmony_ciVersion
195bd8deadSopenharmony_ci
205bd8deadSopenharmony_ci    1.0
215bd8deadSopenharmony_ci    
225bd8deadSopenharmony_ciNumber
235bd8deadSopenharmony_ci
245bd8deadSopenharmony_ci    368
255bd8deadSopenharmony_ci
265bd8deadSopenharmony_ciDependencies
275bd8deadSopenharmony_ci
285bd8deadSopenharmony_ci    Written based on the wording of the OpenGL 2.0 specification.
295bd8deadSopenharmony_ci    
305bd8deadSopenharmony_ci    Depends on (but does not require) ARB_texture_float
315bd8deadSopenharmony_ci
325bd8deadSopenharmony_ci    Depends on (but does not require) ARB_color_buffer_float
335bd8deadSopenharmony_ci
345bd8deadSopenharmony_ci    Depends on (but does not require) ARB_half_float_pixel
355bd8deadSopenharmony_ci    
365bd8deadSopenharmony_ci    Interacts with APPLEX_texture_float_16_filter.
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ci    Interacts with APPLEX_color_buffer_float_16_blend.
395bd8deadSopenharmony_ci
405bd8deadSopenharmony_ciOverview
415bd8deadSopenharmony_ci
425bd8deadSopenharmony_ci    This extensions adds texture types, texture internal formats and
435bd8deadSopenharmony_ci    color buffers composed of both 32 bit and 16 floating point numbers.
445bd8deadSopenharmony_ci     16 bit floats (half float) are very similar to the IEEE
455bd8deadSopenharmony_ci    single-precision floating-point standard, except that it has only 5
465bd8deadSopenharmony_ci    exponent bits and 10 mantissa bits. All floating point numbers are
475bd8deadSopenharmony_ci    clamped to the limits of the range representable by their respective
485bd8deadSopenharmony_ci    format.
495bd8deadSopenharmony_ci
505bd8deadSopenharmony_ci    Specifically, APPLE_float_pixels adds four pieces of functionality
515bd8deadSopenharmony_ci    to OpenGL.  First, it provides an HALF_APPLE texture type allowing
525bd8deadSopenharmony_ci    clients to pass textures in the half float format.  Second, it adds
535bd8deadSopenharmony_ci    12 additional sized internal formats to allow OpenGL to process and
545bd8deadSopenharmony_ci    maintain texture data in the requested format if possible.  Next, it
555bd8deadSopenharmony_ci    provides the COLOR_FLOAT_APPLE pixel format to allow creation of
565bd8deadSopenharmony_ci    floating point and half float color buffers. Lastly, it provides an
575bd8deadSopenharmony_ci    additional query to allow clients to verify that they have a
585bd8deadSopenharmony_ci    floating point color buffer.
595bd8deadSopenharmony_ci
605bd8deadSopenharmony_ci    The HALF_APPLE texture type allows clients to use source textures
615bd8deadSopenharmony_ci    composed of half float color components.  This constant is use in
625bd8deadSopenharmony_ci    the type parameter in DrawPixels, ReadPixels and texturing commands
635bd8deadSopenharmony_ci    with a corresponding GL half data type, which corresponds to a 16
645bd8deadSopenharmony_ci    bit half float, and has no special interpretation.
655bd8deadSopenharmony_ci
665bd8deadSopenharmony_ci    Clients can use the 12 additional (6 floating point and 6 half
675bd8deadSopenharmony_ci    float) sized internal texture formats to specify the mapping of R,
685bd8deadSopenharmony_ci    G, B and A values to texture components, as they would with any
695bd8deadSopenharmony_ci    other sized internal texture format.  Note, as is the standard
705bd8deadSopenharmony_ci    practice with OpenGL, implementations should map the sized internal
715bd8deadSopenharmony_ci    texture R, G, B and A values to internal components with memory
725bd8deadSopenharmony_ci    allocations as close as possible to those specified in the sized
735bd8deadSopenharmony_ci    internal format.
745bd8deadSopenharmony_ci
755bd8deadSopenharmony_ci    Floating point color buffers are created by specifying the
765bd8deadSopenharmony_ci    appropriate color floating point pixel format attribute for the
775bd8deadSopenharmony_ci    windowing system API in use by the client.  Both 128 bit and 64 bit
785bd8deadSopenharmony_ci    floating point color buffers can be supported, the former with full
795bd8deadSopenharmony_ci    32 bit floating point components and the latter with 16 bit half
805bd8deadSopenharmony_ci    float components.
815bd8deadSopenharmony_ci
825bd8deadSopenharmony_ci    Additionally, clients can query to see if they have a floating point
835bd8deadSopenharmony_ci    color buffer using GetBooleanv with COLOR_FLOAT_APPLE as the get
845bd8deadSopenharmony_ci    value.  The number of bits per color buffer component can be
855bd8deadSopenharmony_ci    determined in the usual manner.
865bd8deadSopenharmony_ci
875bd8deadSopenharmony_ciIssues:
885bd8deadSopenharmony_ci
895bd8deadSopenharmony_ci    1. How is this extension different from the ARB floating point extensions?
905bd8deadSopenharmony_ci    
915bd8deadSopenharmony_ci        Conceptually, this extension can be considered the union of the
925bd8deadSopenharmony_ci        feature sets from the following extensions:
935bd8deadSopenharmony_ci
945bd8deadSopenharmony_ci            ARB_texture_float
955bd8deadSopenharmony_ci            ARB_color_buffer_float
965bd8deadSopenharmony_ci            ARB_half_float_pixel
975bd8deadSopenharmony_ci        
985bd8deadSopenharmony_ci        with the following EXCEPTIONS:
995bd8deadSopenharmony_ci        
1005bd8deadSopenharmony_ci            * this extension does not support the the per-component
1015bd8deadSopenharmony_ci              query of TEXTURE_*_TYPE from ARB_texture_float.
1025bd8deadSopenharmony_ci
1035bd8deadSopenharmony_ci            * this extension only supports the half float pixel type
1045bd8deadSopenharmony_ci              from ARB_half_float_pixel for {Draw|Read}|Pixels and
1055bd8deadSopenharmony_ci              Tex{Sub}Image{1D|2D|3D}, and for color buffers as
1065bd8deadSopenharmony_ci              described by ARB_color_buffer_float.  (Note: unlike the
1075bd8deadSopenharmony_ci              ARB_half_float extension, APPLE_float_pixels does not
1085bd8deadSopenharmony_ci              support using 16 bit half float data with the imaging
1095bd8deadSopenharmony_ci              subset routines that accept images, i.e.,
1105bd8deadSopenharmony_ci              ConvolutionFilter{1D|2D}, ColorTable, etc.
1115bd8deadSopenharmony_ci
1125bd8deadSopenharmony_ci            * this extension does not include the ClampColorARB routine
1135bd8deadSopenharmony_ci              from ARB_color_buffer_float.  It does, however, use the
1145bd8deadSopenharmony_ci              default clamping behavior specified in the
1155bd8deadSopenharmony_ci              ARB_color_buffer_float extension.
1165bd8deadSopenharmony_ci              
1175bd8deadSopenharmony_ci              Note that this means the following in this extension:
1185bd8deadSopenharmony_ci
1195bd8deadSopenharmony_ci                - vertex color outputs are always clamped, regardless of
1205bd8deadSopenharmony_ci                  color buffer format
1215bd8deadSopenharmony_ci                - fragment color outputs are clamped when writing to a
1225bd8deadSopenharmony_ci                  fixed point color buffer and unclamped when writing to
1235bd8deadSopenharmony_ci                  a floating point color buffer, and
1245bd8deadSopenharmony_ci                - the read color returned by
1255bd8deadSopenharmony_ci                  ReadPixels/CopyPixels/GetTexImage/etc. is clamped when
1265bd8deadSopenharmony_ci                  reading from a fixed point format and unclamped when
1275bd8deadSopenharmony_ci                  reading from a floating point format.
1285bd8deadSopenharmony_ci
1295bd8deadSopenharmony_ci            * unlike ARB_texture_float, this extension only supports
1305bd8deadSopenharmony_ci              GL_NEAREST filtering for float (and half float) textures.
1315bd8deadSopenharmony_ci
1325bd8deadSopenharmony_ci            * unlike ARB_color_buffer_float, this extension does not
1335bd8deadSopenharmony_ci              support src/dst alpha blending on float (and half float)
1345bd8deadSopenharmony_ci              destination color buffers.
1355bd8deadSopenharmony_ci
1365bd8deadSopenharmony_ci    2. Since this extension is more limited than the ARB floating point
1375bd8deadSopenharmony_ci       extensions, what is the appropriate (and "future-proof") method
1385bd8deadSopenharmony_ci       for an application to use to query for floating point color
1395bd8deadSopenharmony_ci       buffer and texture support?
1405bd8deadSopenharmony_ci       
1415bd8deadSopenharmony_ci        This extension and the related extensions
1425bd8deadSopenharmony_ci        APPLEX_color_buffer_float_16_blend and
1435bd8deadSopenharmony_ci        APPLEX_texture_float_16_filter, should be considered
1445bd8deadSopenharmony_ci        "transitional" in nature. The limited functionality described by
1455bd8deadSopenharmony_ci        these extensions is superseded by the more powerful ARB
1465bd8deadSopenharmony_ci        extensions and as hardware becomes more capable, it is possible
1475bd8deadSopenharmony_ci        that future revisions of OpenGL may deprecate or remove them
1485bd8deadSopenharmony_ci        altogether.
1495bd8deadSopenharmony_ci       
1505bd8deadSopenharmony_ci        As such, to allow for ease of transition to support of the ARB
1515bd8deadSopenharmony_ci        floating point extensions, applications are *strongly*
1525bd8deadSopenharmony_ci        encouraged to use the following algorithm to query for floating
1535bd8deadSopenharmony_ci        point texture and color buffer support:
1545bd8deadSopenharmony_ci        
1555bd8deadSopenharmony_ci            // any Floating Point Support at all?
1565bd8deadSopenharmony_ci            bool supportsFloatColorBuffers = FALSE;
1575bd8deadSopenharmony_ci            bool supportsFloatTextures     = FALSE;
1585bd8deadSopenharmony_ci            
1595bd8deadSopenharmony_ci            // 16 bit/component Floating Point Blend/Filter Support?
1605bd8deadSopenharmony_ci            bool supportsFloat16ColorBufferBlending = FALSE;
1615bd8deadSopenharmony_ci            bool supportsFloat16TextureFiltering    = FALSE;
1625bd8deadSopenharmony_ci
1635bd8deadSopenharmony_ci            // 32 bit/component Floating Point Blend/Filter Support?
1645bd8deadSopenharmony_ci            bool supportsFloat32ColorBufferBlending = FALSE;
1655bd8deadSopenharmony_ci            bool supportsFloat32TextureFiltering    = FALSE;
1665bd8deadSopenharmony_ci        
1675bd8deadSopenharmony_ci            // ===============================================
1685bd8deadSopenharmony_ci            // Check for floating point texture support
1695bd8deadSopenharmony_ci            // 
1705bd8deadSopenharmony_ci            // * First check for full ARB_texture_float
1715bd8deadSopenharmony_ci            //   extension and only then check for more
1725bd8deadSopenharmony_ci            //   limited APPLE and APPLEX texture extensions
1735bd8deadSopenharmony_ci            // ===============================================
1745bd8deadSopenharmony_ci            if (extensionSupported("ARB_texture_float"))
1755bd8deadSopenharmony_ci            {
1765bd8deadSopenharmony_ci                supportsFloatTextures           = TRUE;
1775bd8deadSopenharmony_ci                supportsFloat16TextureFiltering = TRUE;
1785bd8deadSopenharmony_ci                supportsFloat32TextureFiltering = TRUE;            
1795bd8deadSopenharmony_ci            }
1805bd8deadSopenharmony_ci            else if (extensionSupported("APPLE_float_pixels"))
1815bd8deadSopenharmony_ci            {
1825bd8deadSopenharmony_ci                supportsFloatTextures = TRUE;
1835bd8deadSopenharmony_ci
1845bd8deadSopenharmony_ci                if (extensionSupported("APPLEX_texture_float_16_filter"))
1855bd8deadSopenharmony_ci                {
1865bd8deadSopenharmony_ci                    supportsFloat16TextureFiltering = TRUE;
1875bd8deadSopenharmony_ci                }
1885bd8deadSopenharmony_ci            }
1895bd8deadSopenharmony_ci
1905bd8deadSopenharmony_ci            // ===============================================
1915bd8deadSopenharmony_ci            // Check for floating point color buffer support
1925bd8deadSopenharmony_ci            // 
1935bd8deadSopenharmony_ci            // * First check for full ARB_color_buffer_float
1945bd8deadSopenharmony_ci            //   extension and only then check for more
1955bd8deadSopenharmony_ci            //   limited APPLE and APPLEX color buffer extensions
1965bd8deadSopenharmony_ci            // ===============================================
1975bd8deadSopenharmony_ci            if (extensionSupported("ARB_color_buffer_float"))
1985bd8deadSopenharmony_ci            {
1995bd8deadSopenharmony_ci                supportsFloatColorBuffers          = TRUE;
2005bd8deadSopenharmony_ci                supportsFloat16ColorBufferBlending = TRUE;
2015bd8deadSopenharmony_ci                supportsFloat32ColorBufferBlending = TRUE;            
2025bd8deadSopenharmony_ci            }
2035bd8deadSopenharmony_ci            else if (extensionSupported("APPLE_float_pixels"))
2045bd8deadSopenharmony_ci            {
2055bd8deadSopenharmony_ci                supportsFloatColorBuffers = TRUE;
2065bd8deadSopenharmony_ci
2075bd8deadSopenharmony_ci                if (extensionSupported("APPLEX_color_buffer_float_16_blend"))
2085bd8deadSopenharmony_ci                {
2095bd8deadSopenharmony_ci                    supportsFloat16ColorBufferBlending = TRUE;
2105bd8deadSopenharmony_ci                }
2115bd8deadSopenharmony_ci            }
2125bd8deadSopenharmony_ci
2135bd8deadSopenharmony_ci
2145bd8deadSopenharmony_ci    3. Why does this extension (and the related APPLEX_*_float_*
2155bd8deadSopenharmony_ci       extensions) even exist, given the existence of the ARB, ATI, and
2165bd8deadSopenharmony_ci       NVIDIA floating point extensions?
2175bd8deadSopenharmony_ci       
2185bd8deadSopenharmony_ci        A good question.  This extension was developed contemporaneously
2195bd8deadSopenharmony_ci        with the ATI and NVIDIA extensions and support for this
2205bd8deadSopenharmony_ci        extension in Mac OS X's OpenGL implementation predates the
2215bd8deadSopenharmony_ci        definition of the ARB extensions.  In addition, this extension
2225bd8deadSopenharmony_ci        specification attempts to document the behavior of the APPLE
2235bd8deadSopenharmony_ci        extension to support use of floating point features on hardware
2245bd8deadSopenharmony_ci        which may not support the full feature set described by the ARB
2255bd8deadSopenharmony_ci        extensions.  The behavior of the APPLE extension more closely
2265bd8deadSopenharmony_ci        matches the feature set of this class of hardware and can be
2275bd8deadSopenharmony_ci        used by applications to get a more accurate description of
2285bd8deadSopenharmony_ci        native hardware support when falling back to software rendering
2295bd8deadSopenharmony_ci        may not be appropriate.
2305bd8deadSopenharmony_ci
2315bd8deadSopenharmony_ci        It is expected that as hardware renderers becomes more capable
2325bd8deadSopenharmony_ci        the Mac OS X OpenGL implementation will transition to supporting
2335bd8deadSopenharmony_ci        the ARB extensions and may deprecate and/or remove these APPLE
2345bd8deadSopenharmony_ci        extensions from the API.  Please see issue #2 for details on how
2355bd8deadSopenharmony_ci        to query for floating point support in a "future-proof" manner.
2365bd8deadSopenharmony_ci
2375bd8deadSopenharmony_ci
2385bd8deadSopenharmony_ci    4. What will happen when the ARB floating point extensions are
2395bd8deadSopenharmony_ci       supported?
2405bd8deadSopenharmony_ci       
2415bd8deadSopenharmony_ci        The APPLE_float_pixels and the related
2425bd8deadSopenharmony_ci        APPLEX_texture_float_16_filter and
2435bd8deadSopenharmony_ci        APPLEX_color_buffer_float_16_blend extensions are intended as a
2445bd8deadSopenharmony_ci        strict subset of the functionality in ARB_texture_float,
2455bd8deadSopenharmony_ci        ARB_color_buffer_float, and ARB_half_float_pixel.
2465bd8deadSopenharmony_ci
2475bd8deadSopenharmony_ci        Consequently, an implementation could legally support all of
2485bd8deadSopenharmony_ci        these extensions simulataneously, however once the ARB
2495bd8deadSopenharmony_ci        extensions are supported there is no need to export the
2505bd8deadSopenharmony_ci        APPLE{X}_* floating point extensions.
2515bd8deadSopenharmony_ci
2525bd8deadSopenharmony_ci        Consequently, it's possible that implementations may deprecate
2535bd8deadSopenharmony_ci        or remove the APPLE_float_pixels,
2545bd8deadSopenharmony_ci        APPLEX_texture_float_16_filter, and
2555bd8deadSopenharmony_ci        APPLEX_color_buffer_float_16_blend extensions when the
2565bd8deadSopenharmony_ci        corresponding ARB extensions are supported by the underlying
2575bd8deadSopenharmony_ci        hardware.  Applications should pay attention to issue #2 above
2585bd8deadSopenharmony_ci        to prepare for this possibility.
2595bd8deadSopenharmony_ci        
2605bd8deadSopenharmony_ci
2615bd8deadSopenharmony_ciNew Procedures and Functions
2625bd8deadSopenharmony_ci
2635bd8deadSopenharmony_ci    None
2645bd8deadSopenharmony_ci
2655bd8deadSopenharmony_ciNew Tokens
2665bd8deadSopenharmony_ci
2675bd8deadSopenharmony_ci    Accepted by the  parameters of DrawPixels, ReadPixels, TexImage1D,
2685bd8deadSopenharmony_ci    TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and
2695bd8deadSopenharmony_ci    GetTexImage:
2705bd8deadSopenharmony_ci
2715bd8deadSopenharmony_ci      HALF_APPLE                      0x140B        // Same as HALF_FLOAT_NV/ARB
2725bd8deadSopenharmony_ci
2735bd8deadSopenharmony_ci    Accepted by the GetBooleanv:
2745bd8deadSopenharmony_ci
2755bd8deadSopenharmony_ci      COLOR_FLOAT_APPLE               0x8A0F
2765bd8deadSopenharmony_ci      
2775bd8deadSopenharmony_ci    Accepted by the  parameter of TexImage1D,
2785bd8deadSopenharmony_ci    TexImage2D, and TexImage3D:
2795bd8deadSopenharmony_ci
2805bd8deadSopenharmony_ci      RGBA_FLOAT32_APPLE              0x8814        // Same as RGBA_FLOAT32_ATI/ARB
2815bd8deadSopenharmony_ci      RGB_FLOAT32_APPLE               0x8815        // Same as RGB_FLOAT32_ATI/ARB              
2825bd8deadSopenharmony_ci      ALPHA_FLOAT32_APPLE             0x8816        // Same as ALPHA_FLOAT32_ATI/ARB            
2835bd8deadSopenharmony_ci      INTENSITY_FLOAT32_APPLE         0x8817        // Same as INTENSITY_FLOAT32_ATI/ARB        
2845bd8deadSopenharmony_ci      LUMINANCE_FLOAT32_APPLE         0x8818        // Same as LUMINANCE_FLOAT32_ATI/ARB        
2855bd8deadSopenharmony_ci      LUMINANCE_ALPHA_FLOAT32_APPLE   0x8819        // Same as LUMINANCE_ALPHA_FLOAT32_ATI/ARB  
2865bd8deadSopenharmony_ci      RGBA_FLOAT16_APPLE              0x881A        // Same as RGBA_FLOAT16_ATI/ARB             
2875bd8deadSopenharmony_ci      RGB_FLOAT16_APPLE               0x881B        // Same as RGB_FLOAT16_ATI/ARB              
2885bd8deadSopenharmony_ci      ALPHA_FLOAT16_APPLE             0x881C        // Same as ALPHA_FLOAT16_ATI/ARB            
2895bd8deadSopenharmony_ci      INTENSITY_FLOAT16_APPLE         0x881D        // Same as NTENSITY_FLOAT16_ATI/ARB        
2905bd8deadSopenharmony_ci      LUMINANCE_FLOAT16_APPLE         0x881E        // Same as LUMINANCE_FLOAT16_ATI/ARB        
2915bd8deadSopenharmony_ci      LUMINANCE_ALPHA_FLOAT16_APPLE   0x881F        // Same as LUMINANCE_ALPHA_FLOAT16_ATI/ARB  
2925bd8deadSopenharmony_ci
2935bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 2.0 Specification (OpenGL Operation)
2945bd8deadSopenharmony_ci
2955bd8deadSopenharmony_ci    Add a new Section 2.1.2, (p. 6):
2965bd8deadSopenharmony_ci
2975bd8deadSopenharmony_ci    2.1.2  16-Bit Floating-Point Numbers
2985bd8deadSopenharmony_ci
2995bd8deadSopenharmony_ci    A 16-bit floating-point number has a 1-bit sign (S), a 5-bit
3005bd8deadSopenharmony_ci    exponent (E), and a 10-bit mantissa (M).  The value of a 16-bit
3015bd8deadSopenharmony_ci    floating-point number is determined by the following:
3025bd8deadSopenharmony_ci
3035bd8deadSopenharmony_ci        (-1)^S * 0.0,                        if E == 0 and M == 0,
3045bd8deadSopenharmony_ci        (-1)^S * 2^-14 * (M / 2^10),         if E == 0 and M != 0,
3055bd8deadSopenharmony_ci        (-1)^S * 2^(E-15) * (1 + M/2^10),    if 0 < E < 31,
3065bd8deadSopenharmony_ci        (-1)^S * INF,                        if E == 31 and M == 0, or
3075bd8deadSopenharmony_ci        NaN,                                 if E == 31 and M != 0,
3085bd8deadSopenharmony_ci
3095bd8deadSopenharmony_ci    where
3105bd8deadSopenharmony_ci
3115bd8deadSopenharmony_ci        S = floor((N mod 65536) / 32768),
3125bd8deadSopenharmony_ci        E = floor((N mod 32768) / 1024), and
3135bd8deadSopenharmony_ci        M = N mod 1024.
3145bd8deadSopenharmony_ci
3155bd8deadSopenharmony_ci    Implementations are also allowed to use any of the following
3165bd8deadSopenharmony_ci    alternative encodings:
3175bd8deadSopenharmony_ci
3185bd8deadSopenharmony_ci        (-1)^S * 0.0,                        if E == 0 and M != 0,
3195bd8deadSopenharmony_ci        (-1)^S * 2^(E-15) * (1 + M/2^10),    if E == 31 and M == 0, or
3205bd8deadSopenharmony_ci        (-1)^S * 2^(E-15) * (1 + M/2^10),    if E == 31 and M != 0,
3215bd8deadSopenharmony_ci
3225bd8deadSopenharmony_ci    Any representable 16-bit floating-point value is legal as input
3235bd8deadSopenharmony_ci    to a GL command that accepts 16-bit floating-point data.  The
3245bd8deadSopenharmony_ci    result of providing a value that is not a floating-point number
3255bd8deadSopenharmony_ci    (such as infinity or NaN) to such a command is unspecified, but
3265bd8deadSopenharmony_ci    must not lead to GL interruption or termination.  Providing a
3275bd8deadSopenharmony_ci    denormalized number or negative zero to GL must yield predictable
3285bd8deadSopenharmony_ci    results.
3295bd8deadSopenharmony_ci
3305bd8deadSopenharmony_ci    (modify Table 2.2, p. 9) -- add new row
3315bd8deadSopenharmony_ci
3325bd8deadSopenharmony_ci                   Minimum
3335bd8deadSopenharmony_ci       GL Type    Bit Width    Description
3345bd8deadSopenharmony_ci       -------    ---------    -----------------------------------
3355bd8deadSopenharmony_ci       half          16        half-precision floating-point value
3365bd8deadSopenharmony_ci                               encoded in an unsigned scalar
3375bd8deadSopenharmony_ci
3385bd8deadSopenharmony_ci    Modify Section 2.14, (Colors and Coloring), p. 59
3395bd8deadSopenharmony_ci
3405bd8deadSopenharmony_ci    (modify Table 2.9, p. 59)  Add new row to the table:
3415bd8deadSopenharmony_ci
3425bd8deadSopenharmony_ci         GL Type    Conversion
3435bd8deadSopenharmony_ci         -------    ----------
3445bd8deadSopenharmony_ci         half          c
3455bd8deadSopenharmony_ci
3465bd8deadSopenharmony_ci
3475bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization)
3485bd8deadSopenharmony_ci
3495bd8deadSopenharmony_ci    Modify Section 3.6.4 (Rasterization of Pixel Rectangles), p. 126
3505bd8deadSopenharmony_ci
3515bd8deadSopenharmony_ci    (modify next-to-last paragraph, p.136, "Final Conversion") ... For
3525bd8deadSopenharmony_ci    RGBA components, if fragment color clamping is enabled, each element
3535bd8deadSopenharmony_ci    is clamped to [0,1], and may be converted to fixed-point according
3545bd8deadSopenharmony_ci    to the rules given in section 2.14.9 (Final Color Processing).  If
3555bd8deadSopenharmony_ci    fragment color clamping is disabled, RGBA components are unmodified.
3565bd8deadSopenharmony_ci    For the purposes of this specification, fragment color clamping is
3575bd8deadSopenharmony_ci    enabled implicitly if all enabled color buffers have fixed-point
3585bd8deadSopenharmony_ci    components.
3595bd8deadSopenharmony_ci
3605bd8deadSopenharmony_ci    Modify Section 3.8.1 (Texture Image Specification), p. 150
3615bd8deadSopenharmony_ci
3625bd8deadSopenharmony_ci    (modify second paragraph, p. 151) The selected groups are processed
3635bd8deadSopenharmony_ci    exactly as for DrawPixels, stopping just before final conversion.
3645bd8deadSopenharmony_ci    For R, G, B, and A, if the <internalformat> of the texture is
3655bd8deadSopenharmony_ci    fixed-point, the components are clamped to [0, 1].  Otherwise, the
3665bd8deadSopenharmony_ci    components are not modified.  The depth value so generated is
3675bd8deadSopenharmony_ci    clamped to [0, 1].
3685bd8deadSopenharmony_ci
3695bd8deadSopenharmony_ci    (modify the second paragraph, p. 152) The internal component resolution
3705bd8deadSopenharmony_ci    is the number of bits allocated to each value in a texture image. If
3715bd8deadSopenharmony_ci    <internalformat> is specified as a base internal format, the GL stores
3725bd8deadSopenharmony_ci    the resulting texture with internal component resolutions of its own
3735bd8deadSopenharmony_ci    choosing.  If a sized internal format is specified, the mapping of the
3745bd8deadSopenharmony_ci    R, G, B, A, and depth values to texture components is equivalent to the
3755bd8deadSopenharmony_ci    mapping of the corresponding base internal format's components, as
3765bd8deadSopenharmony_ci    specified in table 3.15, the type (unsigned int, float, etc.) is
3775bd8deadSopenharmony_ci    assigned the same type specified by <internalFormat>, and the memory
3785bd8deadSopenharmony_ci    allocation per texture component is assigned by the GL to match the
3795bd8deadSopenharmony_ci    allocations listed in table 3.16 as closely as possible. (The definition
3805bd8deadSopenharmony_ci    of closely is left up to the implementation.  Implementations are not
3815bd8deadSopenharmony_ci    required to support more than one resolution of each type (unsigned int,
3825bd8deadSopenharmony_ci    float, etc.) for each base internal format.) If a compressed internal
3835bd8deadSopenharmony_ci    format is specified, the mapping of the R, G, B, A, and depth values to
3845bd8deadSopenharmony_ci    texture components is equivalent to the mapping of the corresponding
3855bd8deadSopenharmony_ci    base internal format's components, as specified in table 3.15. The
3865bd8deadSopenharmony_ci    specified image is compressed using a (possibly lossy) compression
3875bd8deadSopenharmony_ci    algorithm chosen by the GL.
3885bd8deadSopenharmony_ci
3895bd8deadSopenharmony_ci    (add the following to table 3.16, p. 154)
3905bd8deadSopenharmony_ci
3915bd8deadSopenharmony_ci      Sized                       Base             R    G    B    A    L    I
3925bd8deadSopenharmony_ci      Internal Format             Internal Format bits bits bits bits bits bits
3935bd8deadSopenharmony_ci      --------------------------- --------------- ---- ---- ---- ---- ---- ----
3945bd8deadSopenharmony_ci      RGBA32F_ARB                 RGBA            f32  f32  f32  f32
3955bd8deadSopenharmony_ci      RGB32F_ARB                  RGB             f32  f32  f32
3965bd8deadSopenharmony_ci      ALPHA32F_ARB                ALPHA                          f32
3975bd8deadSopenharmony_ci      INTENSITY32F_ARB            INTENSITY                                f32
3985bd8deadSopenharmony_ci      LUMINANCE32F_ARB            LUMINANCE                           f32
3995bd8deadSopenharmony_ci      LUMINANCE_ALPHA32F_ARB      LUMINANCE_ALPHA                f32  f32
4005bd8deadSopenharmony_ci      RGBA16F_ARB                 RGBA            f16  f16  f16  f16
4015bd8deadSopenharmony_ci      RGB16F_ARB                  RGB             f16  f16  f16
4025bd8deadSopenharmony_ci      ALPHA16F_ARB                ALPHA                          f16
4035bd8deadSopenharmony_ci      INTENSITY16F_ARB            INTENSITY                                f16
4045bd8deadSopenharmony_ci      LUMINANCE16F_ARB            LUMINANCE                           f16
4055bd8deadSopenharmony_ci      LUMINANCE_ALPHA16F_ARB      LUMINANCE_ALPHA                f16  f16
4065bd8deadSopenharmony_ci
4075bd8deadSopenharmony_ci      Table 3.16: Correspondence of sized internal formats to base
4085bd8deadSopenharmony_ci      internal formats, and desired component resolutions for each
4095bd8deadSopenharmony_ci      sized internal format.  The notation <f16> and <f32> imply
4105bd8deadSopenharmony_ci      16- and 32-bit floating-point, respectively.
4115bd8deadSopenharmony_ci
4125bd8deadSopenharmony_ci    Modify Section 3.8.4 (Texture Parameters), p. 166
4135bd8deadSopenharmony_ci
4145bd8deadSopenharmony_ci    (remove TEXTURE_BORDER_COLOR from end of first paragraph, p. 166)
4155bd8deadSopenharmony_ci
4165bd8deadSopenharmony_ci    ... If the value for TEXTURE_PRIORITY is specified as an integer,
4175bd8deadSopenharmony_ci    the conversion for signed integers from table 2.9 is applied to
4185bd8deadSopenharmony_ci    convert this value to floating-point, followed by clamping the
4195bd8deadSopenharmony_ci    value to lie in [0, 1].
4205bd8deadSopenharmony_ci
4215bd8deadSopenharmony_ci    (modify last paragraph, p. 174) ... If the texture contains color
4225bd8deadSopenharmony_ci    components, the values of TEXTURE BORDER COLOR are interpreted as
4235bd8deadSopenharmony_ci    an RGBA color to match the texture's internal format in a manner
4245bd8deadSopenharmony_ci    consistent with table 3.15.  The border values for texture
4255bd8deadSopenharmony_ci    components stored as fixed-point values are clamped to [0, 1]
4265bd8deadSopenharmony_ci    before they are used.  If the texture contains depth ...
4275bd8deadSopenharmony_ci
4285bd8deadSopenharmony_ci
4295bd8deadSopenharmony_ci    Add a new section, after 3.8.9 and prior to section 3.8.10, p. 177
4305bd8deadSopenharmony_ci
4315bd8deadSopenharmony_ci    3.8.9.5 Floating point formats and texture filters
4325bd8deadSopenharmony_ci    
4335bd8deadSopenharmony_ci    Due to limitations in current render hardware, textures with
4345bd8deadSopenharmony_ci    floating point formats may not support minification or magnification
4355bd8deadSopenharmony_ci    filters that require LINEAR filtering in the manner described above.
4365bd8deadSopenharmony_ci    
4375bd8deadSopenharmony_ci    Specifically, if the texture filter is neither GL_NEAREST nor
4385bd8deadSopenharmony_ci    GL_NEAREST_MIPMAP_NEAREST, and *any* of following conditions are
4395bd8deadSopenharmony_ci    true:
4405bd8deadSopenharmony_ci    
4415bd8deadSopenharmony_ci        * the <internalformat> of the texture is a 32-bit/component
4425bd8deadSopenharmony_ci          floating point format and ARB_texture_float is not supported
4435bd8deadSopenharmony_ci          by the implementation, *or*
4445bd8deadSopenharmony_ci
4455bd8deadSopenharmony_ci        * the <internalformat> of the texture is a 16-bit/component
4465bd8deadSopenharmony_ci          floating point format and APPLEX_texture_float_16_filter
4475bd8deadSopenharmony_ci          extension is not supported by the implementation,
4485bd8deadSopenharmony_ci     
4495bd8deadSopenharmony_ci    then the GL will interpret texture minification and magnification filters
4505bd8deadSopenharmony_ci    according to the table (xxx.1) listed below:
4515bd8deadSopenharmony_ci    
4525bd8deadSopenharmony_ci        specified filter         will behave as:
4535bd8deadSopenharmony_ci        ----------------         --------------
4545bd8deadSopenharmony_ci        LINEAR                   NEAREST
4555bd8deadSopenharmony_ci        NEAREST_MIPMAP_LINEAR    NEAREST_MIPMAP_NEAREST
4565bd8deadSopenharmony_ci        LINEAR_MIPMAP_NEAREST    NEAREST_MIPMAP_NEAREST
4575bd8deadSopenharmony_ci        LINEAR_MIPMAP_LINEAR     NEAREST_MIPMAP_NEAREST
4585bd8deadSopenharmony_ci        ----------------------------------------------------
4595bd8deadSopenharmony_ci        Table xxx.1 - floating point texture filter behavior
4605bd8deadSopenharmony_ci
4615bd8deadSopenharmony_ci    Otherwise, the texture minification and magnfication filters behave
4625bd8deadSopenharmony_ci    as specified earlier in section 3.8.8 and 3.8.9.
4635bd8deadSopenharmony_ci
4645bd8deadSopenharmony_ci
4655bd8deadSopenharmony_ci    Modify Section 3.8.13 (Texture Environments and Functions), p.182
4665bd8deadSopenharmony_ci
4675bd8deadSopenharmony_ci    (modify third paragraph, p. 183, removing clamping language)
4685bd8deadSopenharmony_ci     ...TEXTURE_ENV_COLOR is set to an RGBA color by providing four
4695bd8deadSopenharmony_ci    single-precision floating-point values.  If integers are provided
4705bd8deadSopenharmony_ci    for TEXTURE ENV COLOR, then they are converted to floating-point
4715bd8deadSopenharmony_ci    as specified in table 2.9 for signed integers.
4725bd8deadSopenharmony_ci
4735bd8deadSopenharmony_ci    (replace the sixth paragraph of p. 183) If fragment color clamping
4745bd8deadSopenharmony_ci    is enabled, all of these color values, including the results, are
4755bd8deadSopenharmony_ci    clamped to the range [0,1].  If fragment color clamping is
4765bd8deadSopenharmony_ci    disabled, the values are not clamped.  The texture functions are
4775bd8deadSopenharmony_ci    specified in tables 3.22, 3.23, and 3.24.
4785bd8deadSopenharmony_ci
4795bd8deadSopenharmony_ci    (modify seventh paragraph of p. 183) ... ALPHA_SCALE, respectively.
4805bd8deadSopenharmony_ci    If fragment color clamping is enabled, the arguments and results
4815bd8deadSopenharmony_ci    used in table 3.24 are clamped to [0,1].  Otherwise, the results
4825bd8deadSopenharmony_ci    are unmodified.
4835bd8deadSopenharmony_ci
4845bd8deadSopenharmony_ci    Modify Section 3.9 (Color Sum), p. 191
4855bd8deadSopenharmony_ci
4865bd8deadSopenharmony_ci    (modify second paragraph) ... the A component of c_sec is unused.
4875bd8deadSopenharmony_ci    If color sum is disabled, then c_pri is assigned to c.  The
4885bd8deadSopenharmony_ci    components of c are then clamped to the range [0,1] if and only
4895bd8deadSopenharmony_ci    if fragment color clamping is enabled.
4905bd8deadSopenharmony_ci
4915bd8deadSopenharmony_ci    Modify Section 3.10 (Fog), p. 191
4925bd8deadSopenharmony_ci
4935bd8deadSopenharmony_ci    (modify fourth paragraph, p. 192, removing clamping language) ...If
4945bd8deadSopenharmony_ci    these are not floating-point values, then they are converted to
4955bd8deadSopenharmony_ci    floating-point using the conversion given in table 2.9 for signed
4965bd8deadSopenharmony_ci    integers.  If fragment color clamping is enabled, the components of
4975bd8deadSopenharmony_ci    C_r and C_f and the result C are clamped to the range [0,1] before
4985bd8deadSopenharmony_ci    the fog blend is performed.
4995bd8deadSopenharmony_ci
5005bd8deadSopenharmony_ci    Modify Section 3.11.2 (Shader Execution), p. 194
5015bd8deadSopenharmony_ci
5025bd8deadSopenharmony_ci    (modify Shader Inputs, first paragraph, p. 196) The built-in
5035bd8deadSopenharmony_ci    variables gl_Color and gl_SecondaryColor hold the R, G, B, and A
5045bd8deadSopenharmony_ci    components, respectively, of the fragment color and secondary
5055bd8deadSopenharmony_ci    color. If the primary color or the secondary color components are
5065bd8deadSopenharmony_ci    represented by the GL as fixed-point values, they undergo an
5075bd8deadSopenharmony_ci    implied conversion to floating-point.  This conversion must leave
5085bd8deadSopenharmony_ci    the values 0 and 1 invariant. Floating-point color components
5095bd8deadSopenharmony_ci    (resulting from a disabled vertex color clamp) are unmodified.
5105bd8deadSopenharmony_ci
5115bd8deadSopenharmony_ci    (modify Shader Outputs, first paragraph, p. 196) ... These are
5125bd8deadSopenharmony_ci    gl_FragColor, gl_FragData[n], and gl_FragDepth.  If fragment
5135bd8deadSopenharmony_ci    clamping is enabled, the final fragment color values or the final
5145bd8deadSopenharmony_ci    fragment data values written by a fragment shader are clamped to
5155bd8deadSopenharmony_ci    the range [0, 1] and then may be converted to fixed-point as
5165bd8deadSopenharmony_ci    described in section 2.14.9.  If fragment clamping is disabled,
5175bd8deadSopenharmony_ci    the final fragment color values or the final fragment data values
5185bd8deadSopenharmony_ci    are not modified.  The final fragment depth...
5195bd8deadSopenharmony_ci
5205bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 2.0 Specification (Per-Fragment
5215bd8deadSopenharmony_ciOperations and the Frame Buffer)
5225bd8deadSopenharmony_ci
5235bd8deadSopenharmony_ci
5245bd8deadSopenharmony_ci    Modify Chapter 4 Introduction, (p. 198)
5255bd8deadSopenharmony_ci
5265bd8deadSopenharmony_ci    (modify third paragraph, p. 198)  Color buffers consist of either
5275bd8deadSopenharmony_ci    unsigned integer color indices, R, G, B and optionally A unsigned
5285bd8deadSopenharmony_ci    integer values, or R, G, B, and optionally A floating-point values.
5295bd8deadSopenharmony_ci    The number of bitplanes...
5305bd8deadSopenharmony_ci
5315bd8deadSopenharmony_ci    Modify Section 4.1.3 (Multisample Fragment Operations), p. 200
5325bd8deadSopenharmony_ci
5335bd8deadSopenharmony_ci    (modify last paragraph, p. 200) ...and all 0's corresponding to all
5345bd8deadSopenharmony_ci    alpha values being 0.  The alpha values used to generate a coverage
5355bd8deadSopenharmony_ci    value are clamped to the range [0,1]. It is also intended ...
5365bd8deadSopenharmony_ci
5375bd8deadSopenharmony_ci    Modify Section 4.1.5 (Alpha Test), p. 201
5385bd8deadSopenharmony_ci
5395bd8deadSopenharmony_ci    (modify first paragraph of section, deleting clamping of
5405bd8deadSopenharmony_ci     reference value)  ... The test is controlled with
5415bd8deadSopenharmony_ci
5425bd8deadSopenharmony_ci       void AlphaFunc(enum func, float ref);
5435bd8deadSopenharmony_ci
5445bd8deadSopenharmony_ci    func is a symbolic constant indicating the alpha test function;
5455bd8deadSopenharmony_ci    ref is a reference value.  When performing the alpha test, the GL
5465bd8deadSopenharmony_ci    will convert the reference value to the same representation as the
5475bd8deadSopenharmony_ci    the fragment's alpha value (floating-point or fixed-point).
5485bd8deadSopenharmony_ci    For fixed-point, the reference value is converted according to the
5495bd8deadSopenharmony_ci    rules given for an A component in section 2.14.9 and the fragment's
5505bd8deadSopenharmony_ci    alpha value is rounded to the nearest integer.  The possible ...
5515bd8deadSopenharmony_ci
5525bd8deadSopenharmony_ci    Modify Section 4.1.8 (Blending), p. 205
5535bd8deadSopenharmony_ci
5545bd8deadSopenharmony_ci    (modify first paragraph, p. 206) Source and destination values are
5555bd8deadSopenharmony_ci    combined according to the blend equation, quadruplets of source and
5565bd8deadSopenharmony_ci    destination weighting factors determined by the blend functions, and
5575bd8deadSopenharmony_ci    a constant blend color to obtain a new set of R, G, B, and A values,
5585bd8deadSopenharmony_ci    as described below.
5595bd8deadSopenharmony_ci    
5605bd8deadSopenharmony_ci    If the color buffer is fixed-point, the components of the source
5615bd8deadSopenharmony_ci    and destination values and blend factors are clamped to [0, 1]
5625bd8deadSopenharmony_ci    prior to evaluating the blend equation, the components of the
5635bd8deadSopenharmony_ci    blending result are clamped to [0,1] and converted to fixed-
5645bd8deadSopenharmony_ci    point values in the manner described in section 2.14.9. If the
5655bd8deadSopenharmony_ci    color buffer is floating-point, no clamping occurs.  The
5665bd8deadSopenharmony_ci    resulting four values are sent to the next operation.
5675bd8deadSopenharmony_ci
5685bd8deadSopenharmony_ci    Blending is dependent on the incoming fragment's alpha value and
5695bd8deadSopenharmony_ci    that of the corresponding currently stored pixel. Blending applies
5705bd8deadSopenharmony_ci    only in RGBA mode and only one of the following conditions is true:
5715bd8deadSopenharmony_ci        
5725bd8deadSopenharmony_ci        * the format of the current color buffer is fixed-point, *or*
5735bd8deadSopenharmony_ci
5745bd8deadSopenharmony_ci        * the format of current color buffer(s) is 16 bit floating point
5755bd8deadSopenharmony_ci          and the APPLEX_color_buffer_float_16_blend extension is
5765bd8deadSopenharmony_ci          supported by the implementation, *or*
5775bd8deadSopenharmony_ci
5785bd8deadSopenharmony_ci        * the format of the current color buffer is floating-point and
5795bd8deadSopenharmony_ci          the ARB_color_buffer_float extension is supported by the
5805bd8deadSopenharmony_ci          implementation.
5815bd8deadSopenharmony_ci    
5825bd8deadSopenharmony_ci    Otherwise, the blending stage is bypassed. Blending is enabled or
5835bd8deadSopenharmony_ci    disabled using Enable or Disable with the symbolic constant BLEND.
5845bd8deadSopenharmony_ci    If it is disabled (or bypassed), or if logical operation on color
5855bd8deadSopenharmony_ci    values is enabled (section 4.1.10), proceed to the next operation.
5865bd8deadSopenharmony_ci
5875bd8deadSopenharmony_ci    (modify fifth paragraph, p. 206) Fixed-point destination
5885bd8deadSopenharmony_ci    (framebuffer) components are taken to be fixed-point values
5895bd8deadSopenharmony_ci    represented according to the scheme given in section 2.14.9
5905bd8deadSopenharmony_ci    (Final Color Processing).  Constant color components, floating-
5915bd8deadSopenharmony_ci    point destination components, and source (fragment) components are
5925bd8deadSopenharmony_ci    taken to be floating point values. If source components are
5935bd8deadSopenharmony_ci    represented internally by the GL as either fixed-point values they
5945bd8deadSopenharmony_ci    are also interepreted according to section 2.14.9.
5955bd8deadSopenharmony_ci
5965bd8deadSopenharmony_ci    (modify Blend Color section removing the clamp, p. 209) The
5975bd8deadSopenharmony_ci    constant color C_c to be used in blending is specified with the
5985bd8deadSopenharmony_ci    command
5995bd8deadSopenharmony_ci
6005bd8deadSopenharmony_ci       void BlendColor(float red, float green, float blue, float alpha);
6015bd8deadSopenharmony_ci
6025bd8deadSopenharmony_ci    The constant color can be used in both the source and destination
6035bd8deadSopenharmony_ci    blending functions.
6045bd8deadSopenharmony_ci
6055bd8deadSopenharmony_ci    Replace Section 4.1.9 (Dithering), p. 209
6065bd8deadSopenharmony_ci
6075bd8deadSopenharmony_ci    Dithering selects between two representable color values or indices.
6085bd8deadSopenharmony_ci    A representable value is a value that has an exact representation in
6095bd8deadSopenharmony_ci    the color buffer.  In RGBA mode dithering selects, for each color
6105bd8deadSopenharmony_ci    component, either the most positive representable color value (for
6115bd8deadSopenharmony_ci    that particular color component) that is less than or equal to the
6125bd8deadSopenharmony_ci    incoming color component value, c, or the most negative
6135bd8deadSopenharmony_ci    representable color value that is greater than or equal to c.  The
6145bd8deadSopenharmony_ci    selection may depend on the x_w and y_w coordinates of the pixel, as
6155bd8deadSopenharmony_ci    well as on the exact value of c.  If one of the two values does not
6165bd8deadSopenharmony_ci    exist, then the selection defaults to the other value.
6175bd8deadSopenharmony_ci
6185bd8deadSopenharmony_ci    In color index mode dithering selects either the largest
6195bd8deadSopenharmony_ci    representable index that is less than or equal to the incoming
6205bd8deadSopenharmony_ci    color value, c, or the smallest representable index that is greater
6215bd8deadSopenharmony_ci    than or equal to c.  If one of the two indices does not exist, then
6225bd8deadSopenharmony_ci    the selection defaults to the other value.
6235bd8deadSopenharmony_ci
6245bd8deadSopenharmony_ci    Many dithering selection algorithms are possible, but an individual
6255bd8deadSopenharmony_ci    selection must depend only on the incoming color index or component
6265bd8deadSopenharmony_ci    value and the fragment's x and y window coordinates.  If dithering
6275bd8deadSopenharmony_ci    is disabled, then each incoming color component c is replaced with
6285bd8deadSopenharmony_ci    the most positive representable color value (for that particular
6295bd8deadSopenharmony_ci    component) that is less than or equal to c, or by the most negative
6305bd8deadSopenharmony_ci    representable value, if no representable value is less than or equal
6315bd8deadSopenharmony_ci    to c; a color index is rounded to the nearest representable index
6325bd8deadSopenharmony_ci    value.
6335bd8deadSopenharmony_ci
6345bd8deadSopenharmony_ci    Dithering is enabled with Enable and disabled with Disable using the
6355bd8deadSopenharmony_ci    symbolic constant DITHER.  The state required is thus a single bit.
6365bd8deadSopenharmony_ci    Initially dithering is enabled.
6375bd8deadSopenharmony_ci
6385bd8deadSopenharmony_ci    Section 4.1.10 (Logical Operation), p. 210
6395bd8deadSopenharmony_ci
6405bd8deadSopenharmony_ci    (insert after the first sentence, p. 210)  Logical operation has no
6415bd8deadSopenharmony_ci    effect on a floating-point destination color buffer.  However, if
6425bd8deadSopenharmony_ci    COLOR_LOGIC_OP is enabled, blending is still disabled.
6435bd8deadSopenharmony_ci
6445bd8deadSopenharmony_ci    Modify Section 4.2.3 (Clearing the Buffers), p. 215
6455bd8deadSopenharmony_ci
6465bd8deadSopenharmony_ci    (modify second paragraph, p. 216, removing clamp of clear color)
6475bd8deadSopenharmony_ci
6485bd8deadSopenharmony_ci       void ClearColor(float r, float g, float b, float a);
6495bd8deadSopenharmony_ci
6505bd8deadSopenharmony_ci    sets the clear value for the color buffers in RGBA mode.
6515bd8deadSopenharmony_ci
6525bd8deadSopenharmony_ci    (add to the end of first partial paragraph, p. 217) ... then a
6535bd8deadSopenharmony_ci    Clear directed at that buffer has no effect.  Fixed-point RGBA
6545bd8deadSopenharmony_ci    color buffers are cleared to a color values derived by taking the
6555bd8deadSopenharmony_ci    clear color, clamping to [0,1], and converting to fixed-point
6565bd8deadSopenharmony_ci    according to the rules of section 2.14.9.
6575bd8deadSopenharmony_ci
6585bd8deadSopenharmony_ci    Modify Section 4.2.4 (The Accumulation Buffer), p. 217
6595bd8deadSopenharmony_ci
6605bd8deadSopenharmony_ci    (modify second paragraph in section, p. 217) ... Using ACCUM
6615bd8deadSopenharmony_ci    obtains R, G, B, and A components from the color buffer currently
6625bd8deadSopenharmony_ci    selected for reading (section 4.3.2). If the color buffer is
6635bd8deadSopenharmony_ci    fixed-point, each component is considered as a fixed-point value
6645bd8deadSopenharmony_ci    in [0,1] (see section 2.14.9) and is converted to floating-point.
6655bd8deadSopenharmony_ci    Each result is then multiplied ...
6665bd8deadSopenharmony_ci
6675bd8deadSopenharmony_ci    (modify second paragraph on p. 218) The RETURN operation takes
6685bd8deadSopenharmony_ci    each color value from the accumulation buffer and multiplies each
6695bd8deadSopenharmony_ci    of the R, G, B, and A components by <value>.  If fragment color
6705bd8deadSopenharmony_ci    clamping is enabled, the results are then clamped to the range
6715bd8deadSopenharmony_ci    [0,1]. ...
6725bd8deadSopenharmony_ci
6735bd8deadSopenharmony_ci    Modify Section 4.3.2 (Reading Pixels), p. 219
6745bd8deadSopenharmony_ci
6755bd8deadSopenharmony_ci    (modify paragraph at top of page, p. 222)  ... For a fixed-point
6765bd8deadSopenharmony_ci    color buffer, each element is taken to be a fixed-point value in
6775bd8deadSopenharmony_ci    [0, 1] with m bits, where m is the number of bits in the
6785bd8deadSopenharmony_ci    corresponding color component of the selected buffer (see
6795bd8deadSopenharmony_ci    section 2.14.9).  For floating-point color buffer, the elements
6805bd8deadSopenharmony_ci    are unmodified.
6815bd8deadSopenharmony_ci
6825bd8deadSopenharmony_ci    (modify Final Conversion, p. 222) For an index, if the type is not
6835bd8deadSopenharmony_ci    FLOAT or HALF_FLOAT_ARB, final conversion consists of masking the
6845bd8deadSopenharmony_ci    index with the value given in Table 4.6; if the type is FLOAT or
6855bd8deadSopenharmony_ci    HALF_FLOAT_ARB, then the integer index is converted to a GL float
6865bd8deadSopenharmony_ci    or half data value.
6875bd8deadSopenharmony_ci
6885bd8deadSopenharmony_ci    For an RGBA color, if <type> is not FLOAT or HALF, or the selected
6895bd8deadSopenharmony_ci    color buffer is a fixed-point buffer, each component is first
6905bd8deadSopenharmony_ci    clamped to [0,1].  Then the appropriate conversion...
6915bd8deadSopenharmony_ci
6925bd8deadSopenharmony_ci    (modify Table 4.7, p. 224 -- add new row)
6935bd8deadSopenharmony_ci
6945bd8deadSopenharmony_ci        type Parameter    GL Data Type    Component Conversion Formula
6955bd8deadSopenharmony_ci        --------------    ------------    ----------------------------
6965bd8deadSopenharmony_ci        HALF_APPLE         half                  c = f
6975bd8deadSopenharmony_ci
6985bd8deadSopenharmony_ci
6995bd8deadSopenharmony_ci
7005bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 2.0 Specification (Special Functions)
7015bd8deadSopenharmony_ci
7025bd8deadSopenharmony_ci    None.
7035bd8deadSopenharmony_ci
7045bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 2.0 Specification (State and
7055bd8deadSopenharmony_ciState Requests)
7065bd8deadSopenharmony_ci
7075bd8deadSopenharmony_ci    Modify Section 6.1.2, Data Conversions, p. 245
7085bd8deadSopenharmony_ci
7095bd8deadSopenharmony_ci    (add new paragraph at the end of the section, p. 245) If fragment
7105bd8deadSopenharmony_ci    color clamping is enabled, querying of the texture border color,
7115bd8deadSopenharmony_ci    texture environment color, fog color, alpha test reference value,
7125bd8deadSopenharmony_ci    blend color, and RGBA clear color will clamp the corresponding
7135bd8deadSopenharmony_ci    state values to [0,1] before returning them.  This behavior
7145bd8deadSopenharmony_ci    provides compatibility with previous versions of the GL that
7155bd8deadSopenharmony_ci    clamped these values when specified.
7165bd8deadSopenharmony_ci
7175bd8deadSopenharmony_ci
7185bd8deadSopenharmony_ciModifications to the AGL Specification
7195bd8deadSopenharmony_ci
7205bd8deadSopenharmony_ci   Modify the values accepted by aglChoosePixelFormat and aglDescribePixelFormat.
7215bd8deadSopenharmony_ci
7225bd8deadSopenharmony_ci    AGL_COLOR_FLOAT
7235bd8deadSopenharmony_ci        If true, this pixel format supports using floating point
7245bd8deadSopenharmony_ci        color buffers as the destination for rendering.
7255bd8deadSopenharmony_ci
7265bd8deadSopenharmony_ciModifications to the CGL Specification
7275bd8deadSopenharmony_ci
7285bd8deadSopenharmony_ci   Modify the values accepted by CGLChoosePixelFormat and CGLDescribePixelFormat.
7295bd8deadSopenharmony_ci
7305bd8deadSopenharmony_ci    kCGLPFAColorFloat
7315bd8deadSopenharmony_ci        If true, this pixel format supports using floating point
7325bd8deadSopenharmony_ci        color buffers as the destination for rendering.
7335bd8deadSopenharmony_ci
7345bd8deadSopenharmony_ciDependencies on ARB_fragment_program
7355bd8deadSopenharmony_ci
7365bd8deadSopenharmony_ci    (modify 2nd paragraph of Section 3.11.4.4 language) If fragment
7375bd8deadSopenharmony_ci    color clamping is enabled, the fragment's color components are first
7385bd8deadSopenharmony_ci    clamped to the range [0,1] and are optionally converted to fixed
7395bd8deadSopenharmony_ci    point as in section 2.14.9.  If the fragment program does not write
7405bd8deadSopenharmony_ci    result.color, the color will be undefined in subsequent stages.
7415bd8deadSopenharmony_ci
7425bd8deadSopenharmony_ciDependencies on ARB_fragment_shader
7435bd8deadSopenharmony_ci
7445bd8deadSopenharmony_ci    (modify 1st paragraph of Section 3.11.6 language) ... are
7455bd8deadSopenharmony_ci    gl_FragColor and gl_FragDepth.  If fragment color clamping is
7465bd8deadSopenharmony_ci    enabled, the final fragment color values written by a fragment
7475bd8deadSopenharmony_ci    shader are clamped to the range [0,1] and are optionally converted
7485bd8deadSopenharmony_ci    to fixed-point as described in section 2.14.9, Final Color
7495bd8deadSopenharmony_ci    Processing.  ...
7505bd8deadSopenharmony_ci
7515bd8deadSopenharmony_ciDependencies on APPLEX_texture_float_16_filter
7525bd8deadSopenharmony_ci
7535bd8deadSopenharmony_ci    If APPLEX_texture_float_16_filter is not supported, then all
7545bd8deadSopenharmony_ci    references to APPLEX_texture_float_16_filter should be removed from
7555bd8deadSopenharmony_ci    this extension.  In this case, 16 bit floating point textures will
7565bd8deadSopenharmony_ci    behave as if the GL_MAG_FILTER is GL_NEAREST and as if GL_MIN_FILTER
7575bd8deadSopenharmony_ci    is either GL_NEAREST_MIPMAP_NEAREST (if a mipmap min filter is
7585bd8deadSopenharmony_ci    requested) or GL_NEAREST (if a non-mipmap min filter is requested).
7595bd8deadSopenharmony_ci
7605bd8deadSopenharmony_ciDependencies on APPLEX_color_buffer_float_16_blend
7615bd8deadSopenharmony_ci
7625bd8deadSopenharmony_ci    If APPLEX_color_buffer_float_16_blend is not supported, then all
7635bd8deadSopenharmony_ci    references to APPLEX_texture_float_16_filter should be removed from
7645bd8deadSopenharmony_ci    this extension.  In this case, rendering to a 16 bit floating point
7655bd8deadSopenharmony_ci    color buffer will behave as if the enable state for GL_BLEND is set
7665bd8deadSopenharmony_ci    to FALSE.
7675bd8deadSopenharmony_ci
7685bd8deadSopenharmony_ciErrors
7695bd8deadSopenharmony_ci
7705bd8deadSopenharmony_ci    None.
7715bd8deadSopenharmony_ci
7725bd8deadSopenharmony_ciNew State
7735bd8deadSopenharmony_ci
7745bd8deadSopenharmony_ci(table 6.25, p. 215)
7755bd8deadSopenharmony_ci
7765bd8deadSopenharmony_ci    Get value          Type  Get Cmnd     Minimum Value  Description                  Sec.  Attribute
7775bd8deadSopenharmony_ci    -----------------  ----  -----------  -------------  ---------------------------  ----  ---------
7785bd8deadSopenharmony_ci    COLOR_FLOAT_APPLE   B    GetBooleanv        -        True if color buffers store   2.7      -
7795bd8deadSopenharmony_ci                                                         floating point components   
7805bd8deadSopenharmony_ci
7815bd8deadSopenharmony_ciRevision History
7825bd8deadSopenharmony_ci
7835bd8deadSopenharmony_ci
7845bd8deadSopenharmony_ci    0.1, 2003, gstahl@apple.com
7855bd8deadSopenharmony_ci        * preliminary draft, documents shipping behavior as of 10.2.3
7865bd8deadSopenharmony_ci
7875bd8deadSopenharmony_ci    0.2, 08/16/2005, jsandmel@apple.com
7885bd8deadSopenharmony_ci        * rewritten to account for the fact that APPLE_float_pixels doesn't support:
7895bd8deadSopenharmony_ci            - float 16/32 texture filtering
7905bd8deadSopenharmony_ci            - float 16/32 color buffer blending
7915bd8deadSopenharmony_ci            - controllable color clamping
7925bd8deadSopenharmony_ci            - texture per-component float-versus-int type queries
7935bd8deadSopenharmony_ci            - half float types with imaging subset routines
7945bd8deadSopenharmony_ci        * added interactions with the shader extensions 
7955bd8deadSopenharmony_ci        * added interactions with the APPLEX_*_float_16_* extensions
7965bd8deadSopenharmony_ci        * added updates to AGL and CGL
7975bd8deadSopenharmony_ci        
798