15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    EXT_pixel_format
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    WGL_EXT_pixel_format
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciVersion
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    $Date: 1999/04/03 08:41:17 $ $Revision: 1.4 $
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciNumber
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    170
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ciDependencies
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ci    WGL_EXT_extensions_string is required.
205bd8deadSopenharmony_ci
215bd8deadSopenharmony_ciOverview
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ci    This extension adds functions to query pixel format attributes
245bd8deadSopenharmony_ci    and to choose from the list of pixel formats supported by a device.
255bd8deadSopenharmony_ci
265bd8deadSopenharmony_ci    These functions treat pixel formats as opaque types: attributes
275bd8deadSopenharmony_ci    are specified by name rather than by accessing them directly as
285bd8deadSopenharmony_ci    fields in a structure.  Thus the list of attributes can be easily
295bd8deadSopenharmony_ci    extended.
305bd8deadSopenharmony_ci    
315bd8deadSopenharmony_ci    Attribute names are defined which correspond to all of the values
325bd8deadSopenharmony_ci    in the PIXELFORMATDESCRIPTOR and LAYERPLANEDESCRIPTOR data structures.
335bd8deadSopenharmony_ci    Additionally this interface allows pixel formats to be supported
345bd8deadSopenharmony_ci    which have attributes that cannot be represented using the standard
355bd8deadSopenharmony_ci    pixel format functions, i.e. DescribePixelFormat, DescribeLayerPlane,
365bd8deadSopenharmony_ci    ChoosePixelFormat, SetPixelFormat, and GetPixelFormat.
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ciIssues
395bd8deadSopenharmony_ci
405bd8deadSopenharmony_ci    1. No provision is made to support extended pixel format attributes in
415bd8deadSopenharmony_ci       metafiles.
425bd8deadSopenharmony_ci    2. The transparent value pixel format attribute doesn't have separate red,
435bd8deadSopenharmony_ci       green and blue values. This is OK since this can be done as an
445bd8deadSopenharmony_ci       additional extension.
455bd8deadSopenharmony_ci    3. Should we add DONT_CARE values for some of the pixel format attributes?
465bd8deadSopenharmony_ci       No we should just ignore attributes that aren't specified in the list
475bd8deadSopenharmony_ci       passed to wglChoosePixelFormatEXT.
485bd8deadSopenharmony_ci    4. Should wglGetPixelFormatAttrib*vEXT ignore the <iLayerPlane> parameter
495bd8deadSopenharmony_ci       when the attribute specified only applies to the main planes (e.g.,
505bd8deadSopenharmony_ci       when the attribute is set to WGL_NUMBER_OVERLAYS) or should it require
515bd8deadSopenharmony_ci       <iLayerPlane> to be set to zero? It will just ignore the parameter.
525bd8deadSopenharmony_ci    5. Should wglGetPixelFormatAttribivEXT convert floating point values to
535bd8deadSopenharmony_ci       fixed point? No, wglChoosePixelFormatEXT needs a way to accept floating
545bd8deadSopenharmony_ci       point values. pfAttribFList accomplishes this.
555bd8deadSopenharmony_ci    6. Should wglChoosePixelFormatEXT take an <iLayerPlane> parameter? Typically
565bd8deadSopenharmony_ci       <iLayerPlane> would be set to zero and a pixel format would be selected
575bd8deadSopenharmony_ci       based on the attributes of the main plane, so there is no <iLayerPlane>
585bd8deadSopenharmony_ci       parameter. This should be OK; applications won't typically select a
595bd8deadSopenharmony_ci       pixel format on the basis of overlay attributes. They can always call
605bd8deadSopenharmony_ci       wglGetPixelFormatAttrib*vEXT to get a pixel format that has the desired
615bd8deadSopenharmony_ci       overlay values.
625bd8deadSopenharmony_ci    7. Application programmers must check to see if a particular extension
635bd8deadSopenharmony_ci       is supported before using any pixel format attributes associated with
645bd8deadSopenharmony_ci       the extension. For example, if WGL_EXT_pbuffer is not supported then
655bd8deadSopenharmony_ci       it is an error to specify WGL_DRAW_TO_PBUFFER_EXT in the attribute list
665bd8deadSopenharmony_ci       to wglGetPixelFormatAttrib*vEXT or wglChoosePixelFormatEXT.
675bd8deadSopenharmony_ci
685bd8deadSopenharmony_ciNew Procedures and Functions
695bd8deadSopenharmony_ci
705bd8deadSopenharmony_ci    BOOL wglGetPixelFormatAttribivEXT(HDC hdc,
715bd8deadSopenharmony_ci                                      int iPixelFormat,
725bd8deadSopenharmony_ci                                      int iLayerPlane,
735bd8deadSopenharmony_ci                                      UINT nAttributes,
745bd8deadSopenharmony_ci                                      int *piAttributes,
755bd8deadSopenharmony_ci                                      int *piValues);
765bd8deadSopenharmony_ci
775bd8deadSopenharmony_ci    BOOL wglGetPixelFormatAttribfvEXT(HDC hdc,
785bd8deadSopenharmony_ci                                      int iPixelFormat,
795bd8deadSopenharmony_ci                                      int iLayerPlane,
805bd8deadSopenharmony_ci                                      UINT nAttributes,
815bd8deadSopenharmony_ci                                      int *piAttributes,
825bd8deadSopenharmony_ci                                      FLOAT *pfValues);
835bd8deadSopenharmony_ci
845bd8deadSopenharmony_ci    BOOL wglChoosePixelFormatEXT(HDC hdc,
855bd8deadSopenharmony_ci                                 const int *piAttribIList,
865bd8deadSopenharmony_ci                                 const FLOAT *pfAttribFList,
875bd8deadSopenharmony_ci                                 UINT nMaxFormats,
885bd8deadSopenharmony_ci                                 int *piFormats,
895bd8deadSopenharmony_ci                                 UINT *nNumFormats);
905bd8deadSopenharmony_ci
915bd8deadSopenharmony_ciNew Tokens
925bd8deadSopenharmony_ci
935bd8deadSopenharmony_ci    Accepted in the <piAttributes> parameter array of
945bd8deadSopenharmony_ci    wglGetPixelFormatAttribivEXT, and wglGetPixelFormatAttribfvEXT:
955bd8deadSopenharmony_ci
965bd8deadSopenharmony_ci        WGL_NUMBER_PIXEL_FORMATS_EXT         0x2000
975bd8deadSopenharmony_ci
985bd8deadSopenharmony_ci    Accepted in the <piAttributes> parameter array of
995bd8deadSopenharmony_ci    wglGetPixelFormatAttribivEXT, and wglGetPixelFormatAttribfvEXT,
1005bd8deadSopenharmony_ci    and in the <piAttribIList> and <pfAttribFList> parameter arrays
1015bd8deadSopenharmony_ci    of wglChoosePixelFormatEXT:
1025bd8deadSopenharmony_ci
1035bd8deadSopenharmony_ci        WGL_DRAW_TO_WINDOW_EXT               0x2001
1045bd8deadSopenharmony_ci        WGL_DRAW_TO_BITMAP_EXT               0x2002
1055bd8deadSopenharmony_ci        WGL_ACCELERATION_EXT                 0x2003
1065bd8deadSopenharmony_ci        WGL_NEED_PALETTE_EXT                 0x2004
1075bd8deadSopenharmony_ci        WGL_NEED_SYSTEM_PALETTE_EXT          0x2005
1085bd8deadSopenharmony_ci        WGL_SWAP_LAYER_BUFFERS_EXT           0x2006
1095bd8deadSopenharmony_ci        WGL_SWAP_METHOD_EXT                  0x2007
1105bd8deadSopenharmony_ci        WGL_NUMBER_OVERLAYS_EXT              0x2008
1115bd8deadSopenharmony_ci        WGL_NUMBER_UNDERLAYS_EXT             0x2009
1125bd8deadSopenharmony_ci        WGL_TRANSPARENT_EXT                  0x200A
1135bd8deadSopenharmony_ci        WGL_TRANSPARENT_VALUE_EXT            0x200B
1145bd8deadSopenharmony_ci        WGL_SHARE_DEPTH_EXT                  0x200C
1155bd8deadSopenharmony_ci        WGL_SHARE_STENCIL_EXT                0x200D
1165bd8deadSopenharmony_ci        WGL_SHARE_ACCUM_EXT                  0x200E
1175bd8deadSopenharmony_ci        WGL_SUPPORT_GDI_EXT                  0x200F
1185bd8deadSopenharmony_ci        WGL_SUPPORT_OPENGL_EXT               0x2010
1195bd8deadSopenharmony_ci        WGL_DOUBLE_BUFFER_EXT                0x2011
1205bd8deadSopenharmony_ci        WGL_STEREO_EXT                       0x2012
1215bd8deadSopenharmony_ci        WGL_PIXEL_TYPE_EXT                   0x2013
1225bd8deadSopenharmony_ci        WGL_COLOR_BITS_EXT                   0x2014
1235bd8deadSopenharmony_ci        WGL_RED_BITS_EXT                     0x2015
1245bd8deadSopenharmony_ci        WGL_RED_SHIFT_EXT                    0x2016
1255bd8deadSopenharmony_ci        WGL_GREEN_BITS_EXT                   0x2017
1265bd8deadSopenharmony_ci        WGL_GREEN_SHIFT_EXT                  0x2018
1275bd8deadSopenharmony_ci        WGL_BLUE_BITS_EXT                    0x2019
1285bd8deadSopenharmony_ci        WGL_BLUE_SHIFT_EXT                   0x201A
1295bd8deadSopenharmony_ci        WGL_ALPHA_BITS_EXT                   0x201B
1305bd8deadSopenharmony_ci        WGL_ALPHA_SHIFT_EXT                  0x201C
1315bd8deadSopenharmony_ci        WGL_ACCUM_BITS_EXT                   0x201D
1325bd8deadSopenharmony_ci        WGL_ACCUM_RED_BITS_EXT               0x201E
1335bd8deadSopenharmony_ci        WGL_ACCUM_GREEN_BITS_EXT             0x201F
1345bd8deadSopenharmony_ci        WGL_ACCUM_BLUE_BITS_EXT              0x2020
1355bd8deadSopenharmony_ci        WGL_ACCUM_ALPHA_BITS_EXT             0x2021
1365bd8deadSopenharmony_ci        WGL_DEPTH_BITS_EXT                   0x2022
1375bd8deadSopenharmony_ci        WGL_STENCIL_BITS_EXT                 0x2023
1385bd8deadSopenharmony_ci        WGL_AUX_BUFFERS_EXT                  0x2024
1395bd8deadSopenharmony_ci
1405bd8deadSopenharmony_ci    Accepted in the <piAttribIList> and <pfAttribFList> parameter arrays
1415bd8deadSopenharmony_ci    of wglChoosePixelFormatEXT.  And returned in the <piValues> parameter
1425bd8deadSopenharmony_ci    array of wglGetPixelFormatAttribivEXT, and the <pfValues> parameter
1435bd8deadSopenharmony_ci    array of wglGetPixelFormatAttribfvEXT,
1445bd8deadSopenharmony_ci
1455bd8deadSopenharmony_ci        WGL_NO_ACCELERATION_EXT              0x2025
1465bd8deadSopenharmony_ci        WGL_GENERIC_ACCELERATION_EXT         0x2026
1475bd8deadSopenharmony_ci        WGL_FULL_ACCELERATION_EXT            0x2027
1485bd8deadSopenharmony_ci
1495bd8deadSopenharmony_ci        WGL_SWAP_EXCHANGE_EXT                0x2028
1505bd8deadSopenharmony_ci        WGL_SWAP_COPY_EXT                    0x2029
1515bd8deadSopenharmony_ci        WGL_SWAP_UNDEFINED_EXT               0x202A
1525bd8deadSopenharmony_ci
1535bd8deadSopenharmony_ci        WGL_TYPE_RGBA_EXT                    0x202B
1545bd8deadSopenharmony_ci        WGL_TYPE_COLORINDEX_EXT              0x202C
1555bd8deadSopenharmony_ci
1565bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.2 Specification (OpenGL Operation)
1575bd8deadSopenharmony_ci
1585bd8deadSopenharmony_ci    None
1595bd8deadSopenharmony_ci
1605bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.2 Specification (Rasterization)
1615bd8deadSopenharmony_ci
1625bd8deadSopenharmony_ci    None
1635bd8deadSopenharmony_ci
1645bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations
1655bd8deadSopenharmony_ciand the Frame buffer)
1665bd8deadSopenharmony_ci
1675bd8deadSopenharmony_ci    None
1685bd8deadSopenharmony_ci
1695bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.2 Specification (Special Functions)
1705bd8deadSopenharmony_ci
1715bd8deadSopenharmony_ci    None
1725bd8deadSopenharmony_ci
1735bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.2 Specification (State and State Requests)
1745bd8deadSopenharmony_ci
1755bd8deadSopenharmony_ci    None
1765bd8deadSopenharmony_ci
1775bd8deadSopenharmony_ciAdditions to the WGL Specification
1785bd8deadSopenharmony_ci
1795bd8deadSopenharmony_ci    Pixel Formats
1805bd8deadSopenharmony_ci
1815bd8deadSopenharmony_ci    WGL uses pixel format indices to refer to the pixel formats supported by a
1825bd8deadSopenharmony_ci    device.  The standard pixel format functions DescribePixelFormat,
1835bd8deadSopenharmony_ci    DescribeLayerPlane, ChoosePixelFormat, SetPixelFormat, and GetPixelFormat
1845bd8deadSopenharmony_ci    specify pixel format attributes using the PIXELFORMATDESCRIPTOR and
1855bd8deadSopenharmony_ci    LAYERPLANEDESCRIPTOR data structures.
1865bd8deadSopenharmony_ci
1875bd8deadSopenharmony_ci    An additional set of functions may be used to query and specify pixel
1885bd8deadSopenharmony_ci    format attributes by name.
1895bd8deadSopenharmony_ci
1905bd8deadSopenharmony_ci    Querying Pixel Format Attributes
1915bd8deadSopenharmony_ci
1925bd8deadSopenharmony_ci    The following two functions can be used to query pixel format attributes
1935bd8deadSopenharmony_ci    by specifying a list of attributes to be queried and providing a buffer
1945bd8deadSopenharmony_ci    in which to receive the results from the query.  These functions can be
1955bd8deadSopenharmony_ci    used to query the attributes of both the main plane and layer planes
1965bd8deadSopenharmony_ci    of a given pixel format.
1975bd8deadSopenharmony_ci
1985bd8deadSopenharmony_ci        BOOL wglGetPixelFormatAttribivEXT(HDC hdc,
1995bd8deadSopenharmony_ci                                          int iPixelFormat,
2005bd8deadSopenharmony_ci                                          int iLayerPlane,
2015bd8deadSopenharmony_ci                                          UINT nAttributes,
2025bd8deadSopenharmony_ci                                          int *piAttributes,
2035bd8deadSopenharmony_ci                                          int *piValues);
2045bd8deadSopenharmony_ci
2055bd8deadSopenharmony_ci    <hdc> specifies the device context on which the pixel format is
2065bd8deadSopenharmony_ci    supported.
2075bd8deadSopenharmony_ci
2085bd8deadSopenharmony_ci    <iPixelFormat> is an index that specifies the pixel format. The pixel
2095bd8deadSopenharmony_ci    formats that a device context supports are identified by positive
2105bd8deadSopenharmony_ci    one-based integer indexes.
2115bd8deadSopenharmony_ci
2125bd8deadSopenharmony_ci    <iLayerPlane> specifies which plane is being queried. Positive values
2135bd8deadSopenharmony_ci    of <iLayerPlane> identify overlay planes, where 1 is the first overlay
2145bd8deadSopenharmony_ci    plane over the main plane, 2 is the second overlay plane over the
2155bd8deadSopenharmony_ci    first overlay plane, and so on. Negative values identify underlay
2165bd8deadSopenharmony_ci    planes, where -1 is the first underlay plane under the main plane,
2175bd8deadSopenharmony_ci    -2 is the second underlay plane under the first underlay plane and
2185bd8deadSopenharmony_ci    so on. Use zero for the main plane.
2195bd8deadSopenharmony_ci
2205bd8deadSopenharmony_ci    <nAttributes> specifies the number of attributes being queried.
2215bd8deadSopenharmony_ci
2225bd8deadSopenharmony_ci    <piAttributes> specifies an array of pixel format attribute identifiers
2235bd8deadSopenharmony_ci    which specify the attributes to be queried.  The following values are
2245bd8deadSopenharmony_ci    accepted:
2255bd8deadSopenharmony_ci
2265bd8deadSopenharmony_ci        WGL_NUMBER_PIXEL_FORMATS_EXT
2275bd8deadSopenharmony_ci        The number of pixel formats for the device context. The
2285bd8deadSopenharmony_ci        <iLayerPlane> and <iPixelFormat> parameters are ignored if this
2295bd8deadSopenharmony_ci        attribute is specified.
2305bd8deadSopenharmony_ci
2315bd8deadSopenharmony_ci        WGL_DRAW_TO_WINDOW_EXT
2325bd8deadSopenharmony_ci        True if the pixel format can be used with a window. The <iLayerPlane>
2335bd8deadSopenharmony_ci        parameter is ignored if this attribute is specified.
2345bd8deadSopenharmony_ci
2355bd8deadSopenharmony_ci        WGL_DRAW_TO_BITMAP_EXT
2365bd8deadSopenharmony_ci        True if the pixel format can be used with a memory bitmap. The
2375bd8deadSopenharmony_ci        <iLayerPlane> parameter is ignored if this attribute is specified.
2385bd8deadSopenharmony_ci
2395bd8deadSopenharmony_ci        WGL_ACCELERATION_EXT
2405bd8deadSopenharmony_ci        Indicates whether the pixel format is supported by the driver.
2415bd8deadSopenharmony_ci        If this is set to WGL_NO_ACCELERATION_EXT then only the software
2425bd8deadSopenharmony_ci        renderer supports this pixel format; if this is set to
2435bd8deadSopenharmony_ci        WGL_GENERIC_ACCELERATION_EXT then the pixel format is supported by
2445bd8deadSopenharmony_ci        an MCD driver; if this is set to WGL_FULL_ACCELERATION_EXT then the
2455bd8deadSopenharmony_ci        pixel format is supported by an ICD driver.
2465bd8deadSopenharmony_ci
2475bd8deadSopenharmony_ci        WGL_NEED_PALETTE_EXT
2485bd8deadSopenharmony_ci        A logical palette is required to achieve the best results for this
2495bd8deadSopenharmony_ci        pixel type. The <iLayerPlane> parameter is ignored if this attribute
2505bd8deadSopenharmony_ci        is specified.
2515bd8deadSopenharmony_ci
2525bd8deadSopenharmony_ci        WGL_NEED_SYSTEM_PALETTE_EXT
2535bd8deadSopenharmony_ci        The hardware supports one hardware palette in 256-color mode only.
2545bd8deadSopenharmony_ci        The <iLayerPlane> parameter is ignored if this attribute is
2555bd8deadSopenharmony_ci        specified.
2565bd8deadSopenharmony_ci
2575bd8deadSopenharmony_ci        WGL_SWAP_LAYER_BUFFERS_EXT
2585bd8deadSopenharmony_ci        True if the hardware can swap layer planes independently of the
2595bd8deadSopenharmony_ci        main planes. The <iLayerPlane> parameter is ignored if this
2605bd8deadSopenharmony_ci        attribute is specified.
2615bd8deadSopenharmony_ci
2625bd8deadSopenharmony_ci        WGL_SWAP_METHOD_EXT
2635bd8deadSopenharmony_ci        If the color buffer has a back buffer, then this indicates how
2645bd8deadSopenharmony_ci        they are swapped. If it is set to WGL_SWAP_EXCHANGE_EXT then
2655bd8deadSopenharmony_ci        swapping exchanges the front and back buffer contents; if it is
2665bd8deadSopenharmony_ci        set to WGL_SWAP_COPY_EXT then swapping copies the back buffer
2675bd8deadSopenharmony_ci        contents to the front buffer; if it is set to
2685bd8deadSopenharmony_ci        WGL_SWAP_UNDEFINED_EXT then the back buffer contents are copied
2695bd8deadSopenharmony_ci        to the front buffer but the back buffer contents are undefined
2705bd8deadSopenharmony_ci        after the operation. The <iLayerPlane> parameter is ignored if
2715bd8deadSopenharmony_ci        this attribute is specified.
2725bd8deadSopenharmony_ci
2735bd8deadSopenharmony_ci        WGL_NUMBER_OVERLAYS_EXT
2745bd8deadSopenharmony_ci        The number of overlay planes. The <iLayerPlane> parameter is ignored
2755bd8deadSopenharmony_ci        if this attribute is specified.
2765bd8deadSopenharmony_ci
2775bd8deadSopenharmony_ci        WGL_NUMBER_UNDERLAYS_EXT
2785bd8deadSopenharmony_ci        The number of underlay planes. The <iLayerPlane> parameter is
2795bd8deadSopenharmony_ci        ignored if this attribute is specified.
2805bd8deadSopenharmony_ci
2815bd8deadSopenharmony_ci        WGL_TRANSPARENT_EXT
2825bd8deadSopenharmony_ci        True if transparency is supported. Use the WGL_TRANSPARENT_VALUE
2835bd8deadSopenharmony_ci        attribute to retrieve the transparent color value.
2845bd8deadSopenharmony_ci
2855bd8deadSopenharmony_ci        WGL_TRANSPARENT_VALUE_EXT
2865bd8deadSopenharmony_ci        Specifies the transparent color or index value. Typically this
2875bd8deadSopenharmony_ci        value is the same for all layer planes.
2885bd8deadSopenharmony_ci
2895bd8deadSopenharmony_ci        WGL_SHARE_DEPTH_EXT
2905bd8deadSopenharmony_ci        True if the layer plane shares the depth buffer with the main
2915bd8deadSopenharmony_ci        planes. If <iLayerPlane> is zero, this is always true.
2925bd8deadSopenharmony_ci
2935bd8deadSopenharmony_ci        WGL_SHARE_STENCIL_EXT
2945bd8deadSopenharmony_ci        True if the layer plane shares the stencil buffer with the main
2955bd8deadSopenharmony_ci        planes. If <iLayerPlane> is zero, this is always true.
2965bd8deadSopenharmony_ci
2975bd8deadSopenharmony_ci        WGL_SHARE_ACCUM_EXT
2985bd8deadSopenharmony_ci        True if the layer plane shares the accumulation buffer with the
2995bd8deadSopenharmony_ci        main planes. If <iLayerPlane> is zero, this is always true.
3005bd8deadSopenharmony_ci
3015bd8deadSopenharmony_ci        WGL_SUPPORT_GDI_EXT
3025bd8deadSopenharmony_ci        True if GDI rendering is supported.
3035bd8deadSopenharmony_ci
3045bd8deadSopenharmony_ci        WGL_SUPPORT_OPENGL_EXT
3055bd8deadSopenharmony_ci        True if OpenGL is supported.
3065bd8deadSopenharmony_ci
3075bd8deadSopenharmony_ci        WGL_DOUBLE_BUFFER_EXT
3085bd8deadSopenharmony_ci        True if the color buffer has back/front pairs.
3095bd8deadSopenharmony_ci
3105bd8deadSopenharmony_ci        WGL_STEREO_EXT
3115bd8deadSopenharmony_ci        True if the color buffer has left/right pairs.
3125bd8deadSopenharmony_ci
3135bd8deadSopenharmony_ci        WGL_PIXEL_TYPE_EXT
3145bd8deadSopenharmony_ci        The type of pixel data. This can be set to WGL_TYPE_RGBA_EXT or
3155bd8deadSopenharmony_ci        WGL_TYPE_COLORINDEX_EXT.
3165bd8deadSopenharmony_ci
3175bd8deadSopenharmony_ci        WGL_COLOR_BITS_EXT
3185bd8deadSopenharmony_ci        The number of color bitplanes in each color buffer. For RGBA pixel
3195bd8deadSopenharmony_ci        types, it is the size of the color buffer, excluding the alpha
3205bd8deadSopenharmony_ci        bitplanes, For color-index pixels, it is the size of the color
3215bd8deadSopenharmony_ci        index buffer.
3225bd8deadSopenharmony_ci
3235bd8deadSopenharmony_ci        WGL_RED_BITS_EXT
3245bd8deadSopenharmony_ci        The number of red bitplanes in each RGBA color buffer.
3255bd8deadSopenharmony_ci
3265bd8deadSopenharmony_ci        WGL_RED_SHIFT_EXT
3275bd8deadSopenharmony_ci        The shift count for red bitplanes in each RGBA color buffer.
3285bd8deadSopenharmony_ci
3295bd8deadSopenharmony_ci        WGL_GREEN_BITS_EXT
3305bd8deadSopenharmony_ci        The number of green bitplanes in each RGBA color buffer.
3315bd8deadSopenharmony_ci
3325bd8deadSopenharmony_ci        WGL_GREEN_SHIFT_EXT
3335bd8deadSopenharmony_ci        The shift count for green bitplanes in each RGBA color buffer.
3345bd8deadSopenharmony_ci
3355bd8deadSopenharmony_ci        WGL_BLUE_BITS_EXT
3365bd8deadSopenharmony_ci        The number of blue bitplanes in each RGBA color buffer.
3375bd8deadSopenharmony_ci
3385bd8deadSopenharmony_ci        WGL_BLUE_SHIFT_EXT
3395bd8deadSopenharmony_ci        The shift count for blue bitplanes in each RGBA color buffer.
3405bd8deadSopenharmony_ci
3415bd8deadSopenharmony_ci        WGL_ALPHA_BITS_EXT
3425bd8deadSopenharmony_ci        The number of alpha bitplanes in each RGBA color buffer.
3435bd8deadSopenharmony_ci
3445bd8deadSopenharmony_ci        WGL_ALPHA_SHIFT_EXT
3455bd8deadSopenharmony_ci        The shift count for alpha bitplanes in each RGBA color buffer.
3465bd8deadSopenharmony_ci
3475bd8deadSopenharmony_ci        WGL_ACCUM_BITS_EXT
3485bd8deadSopenharmony_ci        The total number of bitplanes in the accumulation buffer.
3495bd8deadSopenharmony_ci
3505bd8deadSopenharmony_ci        WGL_ACCUM_RED_BITS_EXT
3515bd8deadSopenharmony_ci        The number of red bitplanes in the accumulation buffer.
3525bd8deadSopenharmony_ci
3535bd8deadSopenharmony_ci        WGL_ACCUM_GREEN_BITS_EXT
3545bd8deadSopenharmony_ci        The number of green bitplanes in the accumulation buffer.
3555bd8deadSopenharmony_ci
3565bd8deadSopenharmony_ci        WGL_ACCUM_BLUE_BITS_EXT
3575bd8deadSopenharmony_ci        The number of blue bitplanes in the accumulation buffer.
3585bd8deadSopenharmony_ci
3595bd8deadSopenharmony_ci        WGL_ACCUM_ALPHA_BITS_EXT
3605bd8deadSopenharmony_ci        The number of alpha bitplanes in the accumulation buffer.
3615bd8deadSopenharmony_ci
3625bd8deadSopenharmony_ci        WGL_DEPTH_BITS_EXT
3635bd8deadSopenharmony_ci        The depth of the depth (z-axis) buffer.
3645bd8deadSopenharmony_ci
3655bd8deadSopenharmony_ci        WGL_STENCIL_BITS_EXT
3665bd8deadSopenharmony_ci        The depth of the stencil buffer.
3675bd8deadSopenharmony_ci
3685bd8deadSopenharmony_ci        WGL_AUX_BUFFERS_EXT
3695bd8deadSopenharmony_ci        The number of auxiliary buffers.
3705bd8deadSopenharmony_ci
3715bd8deadSopenharmony_ci    <piValues> points to a buffer into which the results of the query
3725bd8deadSopenharmony_ci    will be placed.  Floating point attribute values are rounded to the
3735bd8deadSopenharmony_ci    nearest integer value. The caller must allocate this array and it
3745bd8deadSopenharmony_ci    must have at least nAttributes entries.
3755bd8deadSopenharmony_ci
3765bd8deadSopenharmony_ci    If the function succeeds, the return value is TRUE. If the
3775bd8deadSopenharmony_ci    function fails, the return value is FALSE. To get extended error
3785bd8deadSopenharmony_ci    information, call GetLastError.
3795bd8deadSopenharmony_ci
3805bd8deadSopenharmony_ci    An error is generated if <piAttributes> contains an invalid
3815bd8deadSopenharmony_ci    attribute, if <iPixelFormat> is larger than the number of pixel
3825bd8deadSopenharmony_ci    formats, if <iLayerPlane> doesn't refer to an existing layer plane,
3835bd8deadSopenharmony_ci    or if <hdc> is invalid.
3845bd8deadSopenharmony_ci
3855bd8deadSopenharmony_ci    If FALSE is returned, <piValues> will not have been modified.
3865bd8deadSopenharmony_ci
3875bd8deadSopenharmony_ci        BOOL wglGetPixelFormatAttribfvEXT(HDC hdc,
3885bd8deadSopenharmony_ci                                          int iPixelFormat,
3895bd8deadSopenharmony_ci                                          int iLayerPlane,
3905bd8deadSopenharmony_ci                                          UINT nAttributes,
3915bd8deadSopenharmony_ci                                          int *piAttributes,
3925bd8deadSopenharmony_ci                                          FLOAT *pfValues);
3935bd8deadSopenharmony_ci
3945bd8deadSopenharmony_ci
3955bd8deadSopenharmony_ci    <hdc> specifies the device context on which the pixel format is
3965bd8deadSopenharmony_ci    supported.
3975bd8deadSopenharmony_ci
3985bd8deadSopenharmony_ci    <iPixelFormat> is an index that specifies the pixel format. The pixel
3995bd8deadSopenharmony_ci    formats that a device context supports are identified by positive
4005bd8deadSopenharmony_ci    one-based integer indexes.
4015bd8deadSopenharmony_ci
4025bd8deadSopenharmony_ci    <iLayerPlane> specifies which plane is being queried. Positive values
4035bd8deadSopenharmony_ci    of <iLayerPlane> identify overlay planes, where 1 is the first overlay
4045bd8deadSopenharmony_ci    plane over the main plane, 2 is the second overlay plane over the
4055bd8deadSopenharmony_ci    first overlay plane, and so on. Negative values identify underlay
4065bd8deadSopenharmony_ci    planes, where -1 is the first underlay plane under the main plane,
4075bd8deadSopenharmony_ci    -2 is the second underlay plane under the first underlay plane and
4085bd8deadSopenharmony_ci    so on. Use zero for the main plane.
4095bd8deadSopenharmony_ci
4105bd8deadSopenharmony_ci    <piAttributes> is an array of pixel format attribute identifiers which
4115bd8deadSopenharmony_ci    specify the attributes to be queried.  The values accepted are the
4125bd8deadSopenharmony_ci    same as for wglGetPixelFormatAttribivEXT.
4135bd8deadSopenharmony_ci
4145bd8deadSopenharmony_ci    <pfValues> is a pointer to a buffer into which the results of the query
4155bd8deadSopenharmony_ci    will be placed.  Integer attribute values are converted floating point
4165bd8deadSopenharmony_ci    The caller must allocate this array and it must have at least
4175bd8deadSopenharmony_ci    <nAttributes> entries.
4185bd8deadSopenharmony_ci
4195bd8deadSopenharmony_ci    If the function succeeds, the return value is TRUE. If the
4205bd8deadSopenharmony_ci    function fails, the return value is FALSE. To get extended error
4215bd8deadSopenharmony_ci    information, call GetLastError.
4225bd8deadSopenharmony_ci
4235bd8deadSopenharmony_ci    An error is generated if <piAttributes> contains an invalid
4245bd8deadSopenharmony_ci    attribute, if <iPixelFormat> is larger than the number of pixel
4255bd8deadSopenharmony_ci    formats, if <iLayerPlane> doesn't refer to an existing layer plane,
4265bd8deadSopenharmony_ci    or if <hdc> is invalid.
4275bd8deadSopenharmony_ci
4285bd8deadSopenharmony_ci    If FALSE is returned, <pfValues> will not have been modified.
4295bd8deadSopenharmony_ci
4305bd8deadSopenharmony_ci    Supported Pixel Formats
4315bd8deadSopenharmony_ci
4325bd8deadSopenharmony_ci    The maximum index of the pixel formats which can be referenced
4335bd8deadSopenharmony_ci    by the standard pixel format functions is returned by a successful
4345bd8deadSopenharmony_ci    call to DescribePixelFormat.  This may be less than the maximum
4355bd8deadSopenharmony_ci    index of the pixel formats which can be referenced by
4365bd8deadSopenharmony_ci    wglGetPixelFormatAttribivEXT and wglGetPixelFormatAttribfvEXT.
4375bd8deadSopenharmony_ci    (determined by querying WGL_NUMBER_PIXEL_FORMATS_EXT).
4385bd8deadSopenharmony_ci
4395bd8deadSopenharmony_ci    The pixel format of a "displayable" object (e.g. window, bitmap) is
4405bd8deadSopenharmony_ci    specified by passing its index to SetPixelFormat.  Therefore, pixel
4415bd8deadSopenharmony_ci    formats which cannot be referenced by the standard pixel format
4425bd8deadSopenharmony_ci    functions are "non displayable".
4435bd8deadSopenharmony_ci
4445bd8deadSopenharmony_ci    Indices are assigned to pixel formats in the following order:
4455bd8deadSopenharmony_ci
4465bd8deadSopenharmony_ci    1. Accelerated pixel formats that are displayable
4475bd8deadSopenharmony_ci
4485bd8deadSopenharmony_ci    2. Accelerated pixel formats that are displayable and which
4495bd8deadSopenharmony_ci       have extended attributes
4505bd8deadSopenharmony_ci
4515bd8deadSopenharmony_ci    3. Generic pixel formats
4525bd8deadSopenharmony_ci
4535bd8deadSopenharmony_ci    4. Accelerated pixel formats that are non displayable
4545bd8deadSopenharmony_ci    
4555bd8deadSopenharmony_ci    ChoosePixelFormat will never select pixel formats from either
4565bd8deadSopenharmony_ci    group 2 or group 4.  Each pixel format in group 2 is required to
4575bd8deadSopenharmony_ci    appear identical to some pixel format in group 1 when queried by
4585bd8deadSopenharmony_ci    DescribePixelFormat.  Consequently, ChoosePixelFormat will always
4595bd8deadSopenharmony_ci    select a format from group 1 when it might otherwise have selected
4605bd8deadSopenharmony_ci    a format from group 2.  Pixel formats in group 4 cannot be accessed
4615bd8deadSopenharmony_ci    by ChoosePixelFormat at all.
4625bd8deadSopenharmony_ci
4635bd8deadSopenharmony_ci    The following function may be used to select from among all of the
4645bd8deadSopenharmony_ci    pixel formats supported by a device.  This function accepts attributes
4655bd8deadSopenharmony_ci    for the main planes.  A list of pixel formats that match the
4665bd8deadSopenharmony_ci    specified attributes is returned with the "best" pixel formats
4675bd8deadSopenharmony_ci    at the start of the list (order is device dependent).
4685bd8deadSopenharmony_ci
4695bd8deadSopenharmony_ci        BOOL wglChoosePixelFormatEXT(HDC hdc,
4705bd8deadSopenharmony_ci                                     const int *piAttribIList,
4715bd8deadSopenharmony_ci                                     const FLOAT *pfAttribFList,
4725bd8deadSopenharmony_ci                                     UINT nMaxFormats,
4735bd8deadSopenharmony_ci                                     int *piFormats,
4745bd8deadSopenharmony_ci                                     UINT *nNumFormats);
4755bd8deadSopenharmony_ci
4765bd8deadSopenharmony_ci    <hdc> specifies the device context.
4775bd8deadSopenharmony_ci
4785bd8deadSopenharmony_ci    <piAttribIList> specifies a list of attribute {type, value} pairs
4795bd8deadSopenharmony_ci    containing integer attribute values. All the attributes in
4805bd8deadSopenharmony_ci    <piAttribIList> are followed by the corresponding desired value.
4815bd8deadSopenharmony_ci    The list is terminated with 0.
4825bd8deadSopenharmony_ci
4835bd8deadSopenharmony_ci    <pfAttribFList> specifies a list of attribute {type, value} pairs
4845bd8deadSopenharmony_ci    containing floating point attribute values. All the attributes in
4855bd8deadSopenharmony_ci    <pfAttribFList> are followed by the corresponding desired value.
4865bd8deadSopenharmony_ci    The list is terminated with 0.
4875bd8deadSopenharmony_ci
4885bd8deadSopenharmony_ci    <nMaxFormats> specifies the maximum number of pixel formats to be
4895bd8deadSopenharmony_ci    returned.
4905bd8deadSopenharmony_ci
4915bd8deadSopenharmony_ci    <piFormats> points to an array of returned indices of the matching
4925bd8deadSopenharmony_ci    pixel formats. The best pixel formats (i.e., closest match and best
4935bd8deadSopenharmony_ci    format for the hardware) are at the head of the list. The caller must
4945bd8deadSopenharmony_ci    allocate this array and it must have at least <nMaxFormats> entries.
4955bd8deadSopenharmony_ci
4965bd8deadSopenharmony_ci    <nNumFormats> returns the number of matching formats. This value may
4975bd8deadSopenharmony_ci    be larger than <nMaxFormats>.
4985bd8deadSopenharmony_ci
4995bd8deadSopenharmony_ci    If the function succeeds, the return value is TRUE.  If the function
5005bd8deadSopenharmony_ci    fails the return value is FALSE. To get extended error information,
5015bd8deadSopenharmony_ci    call GetLastError.
5025bd8deadSopenharmony_ci
5035bd8deadSopenharmony_ci    If FALSE is returned, <piFormats> will not have been modified.
5045bd8deadSopenharmony_ci
5055bd8deadSopenharmony_ci    wglChoosePixelFormatEXT selects pixel formats to return based on
5065bd8deadSopenharmony_ci    the attribute values specified in <piAttribIList> and <pfAttribFList>.
5075bd8deadSopenharmony_ci    All attribute values described in wglGetPixelFormatAttribiv are
5085bd8deadSopenharmony_ci    supported with the exception of WGL_NUMBER_PIXEL_FORMATS_EXT.
5095bd8deadSopenharmony_ci
5105bd8deadSopenharmony_ci    All attributes except WGL_NUMBER_OVERLAYS_EXT, WGL_NUMBER_UNDERLAYS_EXT,
5115bd8deadSopenharmony_ci    WGL_SWAP_LAYER_BUFFERS_EXT, WGL_SHARE_DEPTH_EXT, WGL_SHARE_STENCIL_EXT
5125bd8deadSopenharmony_ci    and WGL_SHARE_ACCUM_EXT apply to the main planes and not to any layer
5135bd8deadSopenharmony_ci    planes.  Applications that need to find a pixel format that supports a
5145bd8deadSopenharmony_ci    layer plane with specific buffer attributes, must go through the list
5155bd8deadSopenharmony_ci    that is returned and call wglGetPixelFormatAttrib*vEXT to find one with
5165bd8deadSopenharmony_ci    the appropriate attributes.
5175bd8deadSopenharmony_ci
5185bd8deadSopenharmony_ci    Attributes that are specified in neither <piAttribIList> nor
5195bd8deadSopenharmony_ci    <pfAttribFList> are ignored (i.e., they are not looked at during the
5205bd8deadSopenharmony_ci    selection process).
5215bd8deadSopenharmony_ci
5225bd8deadSopenharmony_ci    If both <piAttribIList> and <pfAttribFList> are NULL or empty then
5235bd8deadSopenharmony_ci    all pixel formats for this device are returned.
5245bd8deadSopenharmony_ci
5255bd8deadSopenharmony_ci    An error is generated if <piAttribIList> or <pfAttribFList> contain an
5265bd8deadSopenharmony_ci    invalid attribute or if <hdc> is invalid.
5275bd8deadSopenharmony_ci
5285bd8deadSopenharmony_ci    Although it is not an error, the new API calls should not be mixed with
5295bd8deadSopenharmony_ci    old API calls. It is not necessary to change existing OpenGL programs.
5305bd8deadSopenharmony_ci    However, application writers should be encouraged to use the new API
5315bd8deadSopenharmony_ci    whenever possible.
5325bd8deadSopenharmony_ci
5335bd8deadSopenharmony_ciNew State
5345bd8deadSopenharmony_ci
5355bd8deadSopenharmony_ci    None
5365bd8deadSopenharmony_ci
5375bd8deadSopenharmony_ciNew Implementation Dependent State
5385bd8deadSopenharmony_ci
5395bd8deadSopenharmony_ci    None
5405bd8deadSopenharmony_ci
541