Export to GitHub

glextensions - WGL_ARB_pixel_format.wiki


Contents

  • Dependencies
  • Overview
  • New Procedures and Functions
  • New Tokens
  • New State
  • New Implementation Dependent State

Dependencies

WGL_ARB_extensions_string is required.

Overview

This extension adds functions to query pixel format attributes and to choose from the list of supported pixel formats.

These functions treat pixel formats as opaque types: attributes are specified by name rather than by accessing them directly as fields in a structure. Thus the list of attributes can be easily extended.

Attribute names are defined which correspond to all of the values in the PIXELFORMATDESCRIPTOR and LAYERPLANEDESCRIPTOR data structures. Additionally this interface allows pixel formats to be supported which have attributes that cannot be represented using the standard pixel format functions, i.e. DescribePixelFormat, DescribeLayerPlane, ChoosePixelFormat, SetPixelFormat, and GetPixelFormat.

New Procedures and Functions

``` BOOL wglGetPixelFormatAttribivARB(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);

BOOL wglGetPixelFormatAttribfvARB(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);

BOOL wglChoosePixelFormatARB(HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); ```

New Tokens

Accepted in the

<piAttributes>

parameter array of wglGetPixelFormatAttribivARB, and wglGetPixelFormatAttribfvARB, and as a type in the

<piAttribIList>

and

<pfAttribFList>

parameter arrays of wglChoosePixelFormatARB:

|WGL_NUMBER_PIXEL_FORMATS_ARB |0x2000| |:-------------------------------------------|:-----| |WGL_DRAW_TO_WINDOW_ARB |0x2001| |WGL_DRAW_TO_BITMAP_ARB |0x2002| |WGL_ACCELERATION_ARB |0x2003| |WGL_NEED_PALETTE_ARB |0x2004| |WGL_NEED_SYSTEM_PALETTE_ARB |0x2005| |WGL_SWAP_LAYER_BUFFERS_ARB |0x2006| |WGL_SWAP_METHOD_ARB |0x2007| |WGL_NUMBER_OVERLAYS_ARB |0x2008| |WGL_NUMBER_UNDERLAYS_ARB |0x2009| |WGL_TRANSPARENT_ARB |0x200A| |WGL_TRANSPARENT_RED_VALUE_ARB |0x2037| |WGL_TRANSPARENT_GREEN_VALUE_ARB |0x2038| |WGL_TRANSPARENT_BLUE_VALUE_ARB |0x2039| |WGL_TRANSPARENT_ALPHA_VALUE_ARB |0x203A| |WGL_TRANSPARENT_INDEX_VALUE_ARB |0x203B| |WGL_SHARE_DEPTH_ARB |0x200C| |WGL_SHARE_STENCIL_ARB |0x200D| |WGL_SHARE_ACCUM_ARB |0x200E| |WGL_SUPPORT_GDI_ARB |0x200F| |WGL_SUPPORT_OPENGL_ARB |0x2010| |WGL_DOUBLE_BUFFER_ARB |0x2011| |WGL_STEREO_ARB |0x2012| |WGL_PIXEL_TYPE_ARB |0x2013| |WGL_COLOR_BITS_ARB |0x2014| |WGL_RED_BITS_ARB |0x2015| |WGL_RED_SHIFT_ARB |0x2016| |WGL_GREEN_BITS_ARB |0x2017| |WGL_GREEN_SHIFT_ARB |0x2018| |WGL_BLUE_BITS_ARB |0x2019| |WGL_BLUE_SHIFT_ARB |0x201A| |WGL_ALPHA_BITS_ARB |0x201B| |WGL_ALPHA_SHIFT_ARB |0x201C| |WGL_ACCUM_BITS_ARB |0x201D| |WGL_ACCUM_RED_BITS_ARB |0x201E| |WGL_ACCUM_GREEN_BITS_ARB |0x201F| |WGL_ACCUM_BLUE_BITS_ARB |0x2020| |WGL_ACCUM_ALPHA_BITS_ARB |0x2021| |WGL_DEPTH_BITS_ARB |0x2022| |WGL_STENCIL_BITS_ARB |0x2023| |WGL_AUX_BUFFERS_ARB |0x2024|

Accepted as a value in the

<piAttribIList>

and

<pfAttribFList>

parameter arrays of wglChoosePixelFormatARB, and returned in the

<piValues>

parameter array of wglGetPixelFormatAttribivARB, and the

<pfValues>

parameter array of wglGetPixelFormatAttribfvARB:

|WGL_NO_ACCELERATION_ARB |0x2025| |:------------------------------------------|:-----| |WGL_GENERIC_ACCELERATION_ARB |0x2026| |WGL_FULL_ACCELERATION_ARB |0x2027| |WGL_SWAP_EXCHANGE_ARB |0x2028| |WGL_SWAP_COPY_ARB |0x2029| |WGL_SWAP_UNDEFINED_ARB |0x202A| |WGL_TYPE_RGBA_ARB |0x202B| |WGL_TYPE_COLORINDEX_ARB |0x202C|

New State

None

New Implementation Dependent State

None