using System;
using System.Runtime.InteropServices;
namespace Vanara.PInvoke
{
public static partial class Gdi32
{
/// A set of bit flags that specify properties of the pixel buffer.
[PInvokeData("wingdi.h", MSDNShortId = "1480dea3-ae74-4e8b-b4de-fca8de5d8395")]
[Flags]
public enum PFD_FLAGS : uint
{
/// The buffer is double-buffered. This flag and PFD_SUPPORT_GDI are mutually exclusive in the current generic implementation.
PFD_DOUBLEBUFFER = 0x00000001,
/// The buffer is stereoscopic. This flag is not supported in the current generic implementation.
PFD_STEREO = 0x00000002,
/// The buffer can draw to a window or device surface.
PFD_DRAW_TO_WINDOW = 0x00000004,
/// The buffer can draw to a memory bitmap.
PFD_DRAW_TO_BITMAP = 0x00000008,
///
/// The buffer supports GDI drawing. This flag and PFD_DOUBLEBUFFER are mutually exclusive in the current generic implementation.
///
PFD_SUPPORT_GDI = 0x00000010,
/// The buffer supports OpenGL drawing.
PFD_SUPPORT_OPENGL = 0x00000020,
///
/// The pixel format is supported by the GDI software implementation, which is also known as the generic implementation. If this
/// bit is clear, the pixel format is supported by a device driver or hardware.
///
PFD_GENERIC_FORMAT = 0x00000040,
///
/// The buffer uses RGBA pixels on a palette-managed device. A logical palette is required to achieve the best results for this
/// pixel type. Colors in the palette should be specified according to the values of the cRedBits, cRedShift, cGreenBits,
/// cGreenShift, cBluebits, and cBlueShift members. The palette should be created and realized in the device context before
/// calling wglMakeCurrent.
///
PFD_NEED_PALETTE = 0x00000080,
///
/// Defined in the pixel format descriptors of hardware that supports one hardware palette in 256-color mode only. For such
/// systems to use hardware acceleration, the hardware palette must be in a fixed order (for example, 3-3-2) when in RGBA mode or
/// must match the logical palette when in color-index mode.When this flag is set, you must call SetSystemPaletteUse in your
/// program to force a one-to-one mapping of the logical palette and the system palette. If your OpenGL hardware supports
/// multiple hardware palettes and the device driver can allocate spare hardware palettes for OpenGL, this flag is typically clear.
/// This flag is not set in the generic pixel formats.
///
PFD_NEED_SYSTEM_PALETTE = 0x00000100,
///
/// Specifies the content of the back buffer in the double-buffered main color plane following a buffer swap. Swapping the color
/// buffers causes the exchange of the back buffer's content with the front buffer's content. Following the swap, the back
/// buffer's content contains the front buffer's content before the swap. PFD_SWAP_EXCHANGE is a hint only and might not be
/// provided by a driver.
///
PFD_SWAP_EXCHANGE = 0x00000200,
///
/// Specifies the content of the back buffer in the double-buffered main color plane following a buffer swap. Swapping the color
/// buffers causes the content of the back buffer to be copied to the front buffer. The content of the back buffer is not
/// affected by the swap. PFD_SWAP_COPY is a hint only and might not be provided by a driver.
///
PFD_SWAP_COPY = 0x00000400,
///
/// Indicates whether a device can swap individual layer planes with pixel formats that include double-buffered overlay or
/// underlay planes. Otherwise all layer planes are swapped together as a group. When this flag is set, wglSwapLayerBuffers is supported.
///
PFD_SWAP_LAYER_BUFFERS = 0x00000800,
///
/// The pixel format is supported by a device driver that accelerates the generic implementation. If this flag is clear and the
/// PFD_GENERIC_FORMAT flag is set, the pixel format is supported by the generic implementation only.
///
PFD_GENERIC_ACCELERATED = 0x00001000,
/// The PFD support directdraw
PFD_SUPPORT_DIRECTDRAW = 0x00002000,
/// The PFD direc t3 d accelerated
PFD_DIRECT3D_ACCELERATED = 0x00004000,
/// The PFD support composition
PFD_SUPPORT_COMPOSITION = 0x00008000,
///
/// The requested pixel format can either have or not have a depth buffer. To select a pixel format without a depth buffer, you
/// must specify this flag. The requested pixel format can be with or without a depth buffer. Otherwise, only pixel formats with
/// a depth buffer are considered.
///
PFD_DEPTH_DONTCARE = 0x20000000,
/// The requested pixel format can be either single- or double-buffered.
PFD_DOUBLEBUFFER_DONTCARE = 0x40000000,
/// The requested pixel format can be either monoscopic or stereoscopic.
PFD_STEREO_DONTCARE = 0x80000000,
}
/// The plane layer.
[PInvokeData("wingdi.h", MSDNShortId = "1480dea3-ae74-4e8b-b4de-fca8de5d8395")]
public enum PFD_LAYER : sbyte
{
/// The layer is the main plane.
PFD_MAIN_PLANE = 0,
/// The layer is the overlay plane.
PFD_OVERLAY_PLANE = 1,
/// The layer is the underlay plane.
PFD_UNDERLAY_PLANE = -1
}
/// Specifies the type of pixel data.
[PInvokeData("wingdi.h", MSDNShortId = "1480dea3-ae74-4e8b-b4de-fca8de5d8395")]
public enum PFD_TYPE : byte
{
/// RGBA pixels. Each pixel has four components in this order: red, green, blue, and alpha.
PFD_TYPE_RGBA = 0,
/// Color-index pixels. Each pixel uses a color-index value.
PFD_TYPE_COLORINDEX = 1,
}
///
/// The ChoosePixelFormat function attempts to match an appropriate pixel format supported by a device context to a given
/// pixel format specification.
///
///
/// Specifies the device context that the function examines to determine the best match for the pixel format descriptor pointed to by ppfd.
///
///
///
/// Pointer to a PIXELFORMATDESCRIPTOR structure that specifies the requested pixel format. In this context, the members of the
/// PIXELFORMATDESCRIPTOR structure that ppfd points to are used as follows:
///
///
///
/// nSize
/// Specifies the size of the PIXELFORMATDESCRIPTOR data structure. Set this member to .
///
/// -
/// nVersion
/// Specifies the version number of the PIXELFORMATDESCRIPTOR data structure. Set this member to 1.
///
/// -
/// dwFlags
///
/// A set of bit flags that specify properties of the pixel buffer. You can combine the following bit flag constants by using
/// bitwise-OR. If any of the following flags are set, the ChoosePixelFormat function attempts to match pixel formats that also have
/// that flag or flags set. Otherwise, ChoosePixelFormat ignores that flag in the pixel formats: PFD_DRAW_TO_WINDOW,
/// PFD_DRAW_TO_BITMAP, PFD_SUPPORT_GDI, PFD_SUPPORT_OPENGL If any of the following flags are set, ChoosePixelFormat attempts to
/// match pixel formats that also have that flag or flags set. Otherwise, it attempts to match pixel formats without that flag set:
/// PFD_DOUBLEBUFFER PFD_STEREO If the following flag is set, the function ignores the PFD_DOUBLEBUFFER flag in the pixel formats:
/// PFD_DOUBLEBUFFER_DONTCARE If the following flag is set, the function ignores the PFD_STEREO flag in the pixel formats: PFD_STEREO_DONTCARE
///
///
/// -
/// iPixelType
/// Specifies the type of pixel format for the function to consider: PFD_TYPE_RGBA, PFD_TYPE_COLORINDEX
///
/// -
/// cColorBits
/// Zero or greater.
///
/// -
/// cRedBits
/// Not used.
///
/// -
/// cRedShift
/// Not used.
///
/// -
/// cGreenBits
/// Not used.
///
/// -
/// cGreenShift
/// Not used.
///
/// -
/// cBlueBits
/// Not used.
///
/// -
/// cBlueShift
/// Not used.
///
/// -
/// cAlphaBits
/// Zero or greater.
///
/// -
/// cAlphaShift
/// Not used.
///
/// -
/// cAccumBits
/// Zero or greater.
///
/// -
/// cAccumRedBits
/// Not used.
///
/// -
/// cAccumGreenBits
/// Not used.
///
/// -
/// cAccumBlueBits
/// Not used.
///
/// -
/// cAccumAlphaBits
/// Not used.
///
/// -
/// cDepthBits
/// Zero or greater.
///
/// -
/// cStencilBits
/// Zero or greater.
///
/// -
/// cAuxBuffers
/// Zero or greater.
///
/// -
/// iLayerType
/// Specifies one of the following layer type values: PFD_MAIN_PLANE, PFD_OVERLAY_PLANE, PFD_UNDERLAY_PLANE
///
/// -
/// bReserved
/// Not used.
///
/// -
/// dwLayerMask
/// Not used.
///
/// -
/// dwVisibleMask
/// Not used.
///
/// -
/// dwDamageMask
/// Not used.
///
///
///
///
///
/// If the function succeeds, the return value is a pixel format index (one-based) that is the closest match to the given pixel
/// format descriptor.
///
/// If the function fails, the return value is zero. To get extended error information, call GetLastError.
///
///
///
/// You must ensure that the pixel format matched by the ChoosePixelFormat function satisfies your requirements. For example,
/// if you request a pixel format with a 24-bit RGB color buffer but the device context offers only 8-bit RGB color buffers, the
/// function returns a pixel format with an 8-bit RGB color buffer.
///
/// Examples
/// The following code sample shows how to use ChoosePixelFormat to match a specified pixel format.
///
// https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-choosepixelformat int ChoosePixelFormat( HDC hdc, const
// PIXELFORMATDESCRIPTOR *ppfd );
[DllImport(Lib.Gdi32, SetLastError = true, ExactSpelling = true)]
[PInvokeData("wingdi.h", MSDNShortId = "17bd0a2c-5257-4ae3-80f4-a5ad536169fb")]
public static extern int ChoosePixelFormat(HDC hdc, in PIXELFORMATDESCRIPTOR ppfd);
///
/// The DescribePixelFormat function obtains information about the pixel format identified by iPixelFormat of the device
/// associated with hdc. The function sets the members of the PIXELFORMATDESCRIPTOR structure pointed to by ppfd with that pixel
/// format data.
///
/// Specifies the device context.
///
/// Index that specifies the pixel format. The pixel formats that a device context supports are identified by positive one-based
/// integer indexes.
///
///
/// The size, in bytes, of the structure pointed to by ppfd. The DescribePixelFormat function stores no more than nBytes bytes
/// of data to that structure. Set this value to sizeof( PIXELFORMATDESCRIPTOR).
///
///
/// Pointer to a PIXELFORMATDESCRIPTOR structure whose members the function sets with pixel format data. The function stores
/// the number of bytes copied to the structure in the structure's nSize member. If, upon entry, ppfd is NULL, the
/// function writes no data to the structure. This is useful when you only want to obtain the maximum pixel format index of a device context.
///
///
///
/// If the function succeeds, the return value is the maximum pixel format index of the device context. In addition, the function
/// sets the members of the PIXELFORMATDESCRIPTOR structure pointed to by ppfd according to the specified pixel format.
///
/// If the function fails, the return value is zero. To get extended error information, call GetLastError.
///
// https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-describepixelformat int DescribePixelFormat( HDC hdc, int
// iPixelFormat, UINT nBytes, LPPIXELFORMATDESCRIPTOR ppfd );
[DllImport(Lib.Gdi32, SetLastError = true, ExactSpelling = true)]
[PInvokeData("wingdi.h", MSDNShortId = "9692a30d-c7d4-40c7-a265-72c4ebabd5f2")]
public static extern int DescribePixelFormat(HDC hdc, int iPixelFormat, uint nBytes, ref PIXELFORMATDESCRIPTOR ppfd);
/// The GetEnhMetaFilePixelFormat function retrieves pixel format information for an enhanced metafile.
/// Identifies the enhanced metafile.
/// Specifies the size, in bytes, of the buffer into which the pixel format information is copied.
///
/// Pointer to a PIXELFORMATDESCRIPTOR structure that contains the logical pixel format specification. The metafile uses this
/// structure to record the logical pixel format specification.
///
///
/// If the function succeeds and finds a pixel format, the return value is the size of the metafile's pixel format.
/// If no pixel format is present, the return value is zero.
/// If an error occurs and the function fails, the return value is GDI_ERROR. To get extended error information, call GetLastError.
///
///
///
/// When an enhanced metafile specifies a pixel format in its ENHMETAHEADER structure and the pixel format fits in the buffer,
/// the pixel format information is copied into ppfd. When cbBuffer is too small to contain the pixel format of the metafile, the
/// pixel format is not copied to the buffer. In either case, the function returns the size of the metafile's pixel format.
///
/// For information on metafile recording and other operations, see Enhanced Metafile Operations.
///
// https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-getenhmetafilepixelformat UINT GetEnhMetaFilePixelFormat(
// HENHMETAFILE hemf, UINT cbBuffer, PIXELFORMATDESCRIPTOR *ppfd );
[DllImport(Lib.Gdi32, SetLastError = true, ExactSpelling = true)]
[PInvokeData("wingdi.h", MSDNShortId = "80209210-5caa-44a9-a791-991b257d8d28")]
public static extern uint GetEnhMetaFilePixelFormat(HENHMETAFILE hemf, uint cbBuffer, ref PIXELFORMATDESCRIPTOR ppfd);
///
/// The GetPixelFormat function obtains the index of the currently selected pixel format of the specified device context.
///
/// Specifies the device context of the currently selected pixel format index returned by the function.
///
///
/// If the function succeeds, the return value is the currently selected pixel format index of the specified device context. This is
/// a positive, one-based index value.
///
/// If the function fails, the return value is zero. To get extended error information, call GetLastError.
///
// https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-getpixelformat
// int GetPixelFormat( HDC hdc );
[DllImport(Lib.Gdi32, SetLastError = true, ExactSpelling = true)]
[PInvokeData("wingdi.h", MSDNShortId = "e9a65f3a-6932-462f-b342-a993d222fae8")]
public static extern int GetPixelFormat(HDC hdc);
///
/// The SetPixelFormat function sets the pixel format of the specified device context to the format specified by the
/// iPixelFormat index.
///
/// Specifies the device context whose pixel format the function attempts to set.
///
/// Index that identifies the pixel format to set. The various pixel formats supported by a device context are identified by
/// one-based indexes.
///
///
/// Pointer to a PIXELFORMATDESCRIPTOR structure that contains the logical pixel format specification. The system's metafile
/// component uses this structure to record the logical pixel format specification. The structure has no other effect upon the
/// behavior of the SetPixelFormat function.
///
///
/// If the function succeeds, the return value is TRUE.
/// If the function fails, the return value is FALSE. To get extended error information, call GetLastError.
///
///
///
/// If hdc references a window, calling the SetPixelFormat function also changes the pixel format of the window. Setting the
/// pixel format of a window more than once can lead to significant complications for the Window Manager and for multithread
/// applications, so it is not allowed. An application can only set the pixel format of a window one time. Once a window's pixel
/// format is set, it cannot be changed.
///
///
/// You should select a pixel format in the device context before calling the wglCreateContext function. The wglCreateContext
/// function creates a rendering context for drawing on the device in the selected pixel format of the device context.
///
///
/// An OpenGL window has its own pixel format. Because of this, only device contexts retrieved for the client area of an OpenGL
/// window are allowed to draw into the window. As a result, an OpenGL window should be created with the WS_CLIPCHILDREN and
/// WS_CLIPSIBLINGS styles. Additionally, the window class attribute should not include the CS_PARENTDC style.
///
/// Examples
/// The following code example shows SetPixelFormat usage.
///
// https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-setpixelformat BOOL SetPixelFormat( HDC hdc, int format,
// const PIXELFORMATDESCRIPTOR *ppfd );
[DllImport(Lib.Gdi32, SetLastError = true, ExactSpelling = true)]
[PInvokeData("wingdi.h", MSDNShortId = "f8d74078-a7e7-4d95-857a-f51d5d70598e")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool SetPixelFormat(HDC hdc, int format, ref PIXELFORMATDESCRIPTOR ppfd);
///
/// The SwapBuffers function exchanges the front and back buffers if the current pixel format for the window referenced by the
/// specified device context includes a back buffer.
///
///
/// Specifies a device context. If the current pixel format for the window referenced by this device context includes a back buffer,
/// the function exchanges the front and back buffers.
///
///
/// If the function succeeds, the return value is TRUE.
/// If the function fails, the return value is FALSE. To get extended error information, call GetLastError.
///
///
///
/// If the current pixel format for the window referenced by the device context does not include a back buffer, this call has no
/// effect and the content of the back buffer is undefined when the function returns.
///
///
/// With multithread applications, flush the drawing commands in any other threads drawing to the same window before calling SwapBuffers.
///
///
// https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-swapbuffers BOOL SwapBuffers( HDC Arg1 );
[DllImport(Lib.Gdi32, SetLastError = true, ExactSpelling = true)]
[PInvokeData("wingdi.h", MSDNShortId = "2c9728e4-c5be-4b14-a6f7-2899c792ec3d")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool SwapBuffers(HDC Arg1);
/// The PIXELFORMATDESCRIPTOR structure describes the pixel format of a drawing surface.
///
/// Please notice carefully, as documented above, that certain pixel format properties are not supported in the current generic
/// implementation. The generic implementation is the Microsoft GDI software implementation of OpenGL. Hardware manufacturers may
/// enhance parts of OpenGL, and may support some pixel format properties not supported by the generic implementation.
///
// https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/ns-wingdi-tagpixelformatdescriptor typedef struct
// tagPIXELFORMATDESCRIPTOR { WORD nSize; WORD nVersion; DWORD dwFlags; BYTE iPixelType; BYTE cColorBits; BYTE cRedBits; BYTE
// cRedShift; BYTE cGreenBits; BYTE cGreenShift; BYTE cBlueBits; BYTE cBlueShift; BYTE cAlphaBits; BYTE cAlphaShift; BYTE cAccumBits;
// BYTE cAccumRedBits; BYTE cAccumGreenBits; BYTE cAccumBlueBits; BYTE cAccumAlphaBits; BYTE cDepthBits; BYTE cStencilBits; BYTE
// cAuxBuffers; BYTE iLayerType; BYTE bReserved; DWORD dwLayerMask; DWORD dwVisibleMask; DWORD dwDamageMask; } PIXELFORMATDESCRIPTOR,
// *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
[PInvokeData("wingdi.h", MSDNShortId = "1480dea3-ae74-4e8b-b4de-fca8de5d8395")]
[StructLayout(LayoutKind.Sequential)]
public struct PIXELFORMATDESCRIPTOR
{
/// Specifies the size of this data structure. This value should be set to sizeof( PIXELFORMATDESCRIPTOR).
public ushort nSize;
/// Specifies the version of this data structure. This value should be set to 1.
public ushort nVersion;
///
///
/// A set of bit flags that specify properties of the pixel buffer. The properties are generally not mutually exclusive; you can
/// set any combination of bit flags, with the exceptions noted. The following bit flag constants are defined.
///
///
///
/// Value
/// Meaning
///
/// -
/// PFD_DRAW_TO_WINDOW
/// The buffer can draw to a window or device surface.
///
/// -
/// PFD_DRAW_TO_BITMAP
/// The buffer can draw to a memory bitmap.
///
/// -
/// PFD_SUPPORT_GDI
/// The buffer supports GDI drawing. This flag and PFD_DOUBLEBUFFER are mutually exclusive in the current generic implementation.
///
/// -
/// PFD_SUPPORT_OPENGL
/// The buffer supports OpenGL drawing.
///
/// -
/// PFD_GENERIC_ACCELERATED
///
/// The pixel format is supported by a device driver that accelerates the generic implementation. If this flag is clear and the
/// PFD_GENERIC_FORMAT flag is set, the pixel format is supported by the generic implementation only.
///
///
/// -
/// PFD_GENERIC_FORMAT
///
/// The pixel format is supported by the GDI software implementation, which is also known as the generic implementation. If this
/// bit is clear, the pixel format is supported by a device driver or hardware.
///
///
/// -
/// PFD_NEED_PALETTE
///
/// The buffer uses RGBA pixels on a palette-managed device. A logical palette is required to achieve the best results for this
/// pixel type. Colors in the palette should be specified according to the values of the cRedBits, cRedShift, cGreenBits,
/// cGreenShift, cBluebits, and cBlueShift members. The palette should be created and realized in the device context before
/// calling wglMakeCurrent.
///
///
/// -
/// PFD_NEED_SYSTEM_PALETTE
///
/// Defined in the pixel format descriptors of hardware that supports one hardware palette in 256-color mode only. For such
/// systems to use hardware acceleration, the hardware palette must be in a fixed order (for example, 3-3-2) when in RGBA mode or
/// must match the logical palette when in color-index mode.When this flag is set, you must call SetSystemPaletteUse in your
/// program to force a one-to-one mapping of the logical palette and the system palette. If your OpenGL hardware supports
/// multiple hardware palettes and the device driver can allocate spare hardware palettes for OpenGL, this flag is typically
/// clear. This flag is not set in the generic pixel formats.
///
///
/// -
/// PFD_DOUBLEBUFFER
/// The buffer is double-buffered. This flag and PFD_SUPPORT_GDI are mutually exclusive in the current generic implementation.
///
/// -
/// PFD_STEREO
/// The buffer is stereoscopic. This flag is not supported in the current generic implementation.
///
/// -
/// PFD_SWAP_LAYER_BUFFERS
///
/// Indicates whether a device can swap individual layer planes with pixel formats that include double-buffered overlay or
/// underlay planes. Otherwise all layer planes are swapped together as a group. When this flag is set, wglSwapLayerBuffers is supported.
///
///
///
/// You can specify the following bit flags when calling ChoosePixelFormat.
///
///
/// Value
/// Meaning
///
/// -
/// PFD_DEPTH_DONTCARE
///
/// The requested pixel format can either have or not have a depth buffer. To select a pixel format without a depth buffer, you
/// must specify this flag. The requested pixel format can be with or without a depth buffer. Otherwise, only pixel formats with
/// a depth buffer are considered.
///
///
/// -
/// PFD_DOUBLEBUFFER_DONTCARE
/// The requested pixel format can be either single- or double-buffered.
///
/// -
/// PFD_STEREO_DONTCARE
/// The requested pixel format can be either monoscopic or stereoscopic.
///
///
///
/// With the glAddSwapHintRectWIN extension function, two new flags are included for the PIXELFORMATDESCRIPTOR
/// pixel format structure.
///
///
///
/// Value
/// Meaning
///
/// -
/// PFD_SWAP_COPY
///
/// Specifies the content of the back buffer in the double-buffered main color plane following a buffer swap. Swapping the color
/// buffers causes the content of the back buffer to be copied to the front buffer. The content of the back buffer is not
/// affected by the swap. PFD_SWAP_COPY is a hint only and might not be provided by a driver.
///
///
/// -
/// PFD_SWAP_EXCHANGE
///
/// Specifies the content of the back buffer in the double-buffered main color plane following a buffer swap. Swapping the color
/// buffers causes the exchange of the back buffer's content with the front buffer's content. Following the swap, the back
/// buffer's content contains the front buffer's content before the swap. PFD_SWAP_EXCHANGE is a hint only and might not be
/// provided by a driver.
///
///
///
///
public PFD_FLAGS dwFlags;
///
/// Specifies the type of pixel data. The following types are defined.
///
///
/// Value
/// Meaning
///
/// -
/// PFD_TYPE_RGBA
/// RGBA pixels. Each pixel has four components in this order: red, green, blue, and alpha.
///
/// -
/// PFD_TYPE_COLORINDEX
/// Color-index pixels. Each pixel uses a color-index value.
///
///
///
public PFD_TYPE iPixelType;
///
/// Specifies the number of color bitplanes in each color buffer. For RGBA pixel types, it is the size of the color buffer,
/// excluding the alpha bitplanes. For color-index pixels, it is the size of the color-index buffer.
///
public byte cColorBits;
/// Specifies the number of red bitplanes in each RGBA color buffer.
public byte cRedBits;
/// Specifies the shift count for red bitplanes in each RGBA color buffer.
public byte cRedShift;
/// Specifies the number of green bitplanes in each RGBA color buffer.
public byte cGreenBits;
/// Specifies the shift count for green bitplanes in each RGBA color buffer.
public byte cGreenShift;
/// Specifies the number of blue bitplanes in each RGBA color buffer.
public byte cBlueBits;
/// Specifies the shift count for blue bitplanes in each RGBA color buffer.
public byte cBlueShift;
/// Specifies the number of alpha bitplanes in each RGBA color buffer. Alpha bitplanes are not supported.
public byte cAlphaBits;
/// Specifies the shift count for alpha bitplanes in each RGBA color buffer. Alpha bitplanes are not supported.
public byte cAlphaShift;
/// Specifies the total number of bitplanes in the accumulation buffer.
public byte cAccumBits;
/// Specifies the number of red bitplanes in the accumulation buffer.
public byte cAccumRedBits;
/// Specifies the number of green bitplanes in the accumulation buffer.
public byte cAccumGreenBits;
/// Specifies the number of blue bitplanes in the accumulation buffer.
public byte cAccumBlueBits;
/// Specifies the number of alpha bitplanes in the accumulation buffer.
public byte cAccumAlphaBits;
/// Specifies the depth of the depth (z-axis) buffer.
public byte cDepthBits;
/// Specifies the depth of the stencil buffer.
public byte cStencilBits;
/// Specifies the number of auxiliary buffers. Auxiliary buffers are not supported.
public byte cAuxBuffers;
/// Ignored. Earlier implementations of OpenGL used this member, but it is no longer used.
public byte iLayerType;
///
/// Specifies the number of overlay and underlay planes. Bits 0 through 3 specify up to 15 overlay planes and bits 4 through 7
/// specify up to 15 underlay planes.
///
public byte bReserved;
/// Ignored. Earlier implementations of OpenGL used this member, but it is no longer used.
public PFD_LAYER dwLayerMask;
///
/// Specifies the transparent color or index of an underlay plane. When the pixel type is RGBA, dwVisibleMask is a
/// transparent RGB color value. When the pixel type is color index, it is a transparent index value.
///
public uint dwVisibleMask;
/// Ignored. Earlier implementations of OpenGL used this member, but it is no longer used.
public uint dwDamageMask;
}
}
}