'WGL pixel format - color bits vs alpha bits

I use the following code to see available pixel formats:

const int attrib = WGL_NUMBER_PIXEL_FORMATS_ARB;
int count = 0;

if (!wglGetPixelFormatAttribivARB(dc, 0, 0, 1, &attrib, &count))
{
    return 0;
}

const int attribs[] = {
    WGL_DRAW_TO_WINDOW_ARB,
    WGL_SUPPORT_OPENGL_ARB,
    WGL_DOUBLE_BUFFER_ARB, 
    WGL_ACCELERATION_ARB, 
    WGL_PIXEL_TYPE_ARB, 
    WGL_COLOR_BITS_ARB, 
    WGL_RED_BITS_ARB, 
    WGL_GREEN_BITS_ARB, 
    WGL_BLUE_BITS_ARB, 
    WGL_ALPHA_BITS_ARB, 
    WGL_ACCUM_BITS_ARB, 
    WGL_DEPTH_BITS_ARB, 
    WGL_STENCIL_BITS_ARB, 
    WGL_AUX_BUFFERS_ARB, 
    WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB
};

const int attribsCount = sizeof(attribs) / sizeof(attribs[0]);
int values[attribsCount] = { 0 };

for (int i = 0; i < count; ++i)
{
    if (!wglGetPixelFormatAttribivARB(dc, (i + 1), 0, attribsCount, attribs, values))
    {
        return 0;
    }

    //read values
}

There is a pixel format which has 32 color bits but alpha bits equals 0:

WGL_DRAW_TO_WINDOW_ARB: true
WGL_SUPPORT_OPENGL_ARB: true
WGL_DOUBLE_BUFFER_ARB: true
WGL_ACCELERATION_ARB: WGL_FULL_ACCELERATION_ARB 
WGL_PIXEL_TYPE_ARB: WGL_TYPE_RGBA_ARB 
WGL_COLOR_BITS_ARB: 32 
WGL_RED_BITS_ARB: 8 
WGL_GREEN_BITS_ARB: 8 
WGL_BLUE_BITS_ARB: 8 
WGL_ALPHA_BITS_ARB: 0 
WGL_ACCUM_BITS_ARB: 64 
WGL_DEPTH_BITS_ARB: 24 
WGL_STENCIL_BITS_ARB: 0 
WGL_AUX_BUFFERS_ARB: 8 
WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB: true

How to explain that ? I have expected to see 24 color bits for the above red, green, blue and alpha bits values.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source