Show / Hide Table of Contents

Struct Gdi.PIXELFORMATDESCRIPTOR

Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: CADability
Assembly: CADability.dll
Syntax
public struct PIXELFORMATDESCRIPTOR

Fields

| Improve this Doc View Source

bReserved

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.

Declaration
public byte bReserved
Field Value
Type Description
System.Byte
| Improve this Doc View Source

cAccumAlphaBits

Specifies the number of alpha bitplanes in the accumulation buffer.

Declaration
public byte cAccumAlphaBits
Field Value
Type Description
System.Byte
| Improve this Doc View Source

cAccumBits

Specifies the total number of bitplanes in the accumulation buffer.

Declaration
public byte cAccumBits
Field Value
Type Description
System.Byte
| Improve this Doc View Source

cAccumBlueBits

Specifies the number of blue bitplanes in the accumulation buffer.

Declaration
public byte cAccumBlueBits
Field Value
Type Description
System.Byte
| Improve this Doc View Source

cAccumGreenBits

Specifies the number of green bitplanes in the accumulation buffer.

Declaration
public byte cAccumGreenBits
Field Value
Type Description
System.Byte
| Improve this Doc View Source

cAccumRedBits

Specifies the number of red bitplanes in the accumulation buffer.

Declaration
public byte cAccumRedBits
Field Value
Type Description
System.Byte
| Improve this Doc View Source

cAlphaBits

Specifies the number of alpha bitplanes in each RGBA color buffer. Alpha bitplanes are not supported.

Declaration
public byte cAlphaBits
Field Value
Type Description
System.Byte
| Improve this Doc View Source

cAlphaShift

Specifies the shift count for alpha bitplanes in each RGBA color buffer. Alpha bitplanes are not supported.

Declaration
public byte cAlphaShift
Field Value
Type Description
System.Byte
| Improve this Doc View Source

cAuxBuffers

Specifies the number of auxiliary buffers. Auxiliary buffers are not supported.

Declaration
public byte cAuxBuffers
Field Value
Type Description
System.Byte
| Improve this Doc View Source

cBlueBits

Specifies the number of blue bitplanes in each RGBA color buffer.

Declaration
public byte cBlueBits
Field Value
Type Description
System.Byte
| Improve this Doc View Source

cBlueShift

Specifies the shift count for blue bitplanes in each RGBA color buffer.

Declaration
public byte cBlueShift
Field Value
Type Description
System.Byte
| Improve this Doc View Source

cColorBits

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.

Declaration
public byte cColorBits
Field Value
Type Description
System.Byte
| Improve this Doc View Source

cDepthBits

Specifies the depth of the depth (z-axis) buffer.

Declaration
public byte cDepthBits
Field Value
Type Description
System.Byte
| Improve this Doc View Source

cGreenBits

Specifies the number of green bitplanes in each RGBA color buffer.

Declaration
public byte cGreenBits
Field Value
Type Description
System.Byte
| Improve this Doc View Source

cGreenShift

Specifies the shift count for green bitplanes in each RGBA color buffer.

Declaration
public byte cGreenShift
Field Value
Type Description
System.Byte
| Improve this Doc View Source

cRedBits

Specifies the number of red bitplanes in each RGBA color buffer.

Declaration
public byte cRedBits
Field Value
Type Description
System.Byte
| Improve this Doc View Source

cRedShift

Specifies the shift count for red bitplanes in each RGBA color buffer.

Declaration
public byte cRedShift
Field Value
Type Description
System.Byte
| Improve this Doc View Source

cStencilBits

Specifies the depth of the stencil buffer.

Declaration
public byte cStencilBits
Field Value
Type Description
System.Byte
| Improve this Doc View Source

dwDamageMask

Ignored. Earlier implementations of OpenGL used this member, but it is no longer used.

Declaration
public int dwDamageMask
Field Value
Type Description
System.Int32
Remarks

Specifies whether more than one pixel format shares the same frame buffer. If the result of the bitwise AND of the damage masks between two pixel formats is nonzero, then they share the same buffers.

| Improve this Doc View Source

dwFlags

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.

Declaration
public int dwFlags
Field Value
Type Description
System.Int32
Remarks

The following bit flag constants are defined:

ValueMeaning
PFD_DRAW_TO_WINDOWThe buffer can draw to a window or device surface.
PFD_DRAW_TO_BITMAPThe 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_OPENGLThe 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(IntPtr, IntPtr).
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(IntPtr, ref Gdi.PIXELFORMATDESCRIPTOR).

ValueMeaning
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_DONTCAREThe requested pixel format can be either single- or double-buffered.
PFD_STEREO_DONTCAREThe 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.

ValueMeaning
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.
| Improve this Doc View Source

dwLayerMask

Ignored. Earlier implementations of OpenGL used this member, but it is no longer used.

Declaration
public int dwLayerMask
Field Value
Type Description
System.Int32
Remarks

Specifies the layer mask. The layer mask is used in conjunction with the visible mask to determine if one layer overlays another.

| Improve this Doc View Source

dwVisibleMask

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.

Declaration
public int dwVisibleMask
Field Value
Type Description
System.Int32
| Improve this Doc View Source

iLayerType

Ignored. Earlier implementations of OpenGL used this member, but it is no longer used.

Declaration
public byte iLayerType
Field Value
Type Description
System.Byte
Remarks

Specifies the type of layer.

| Improve this Doc View Source

iPixelType

Specifies the type of pixel data. The following types are defined.

Declaration
public byte iPixelType
Field Value
Type Description
System.Byte
Remarks
ValueMeaning
PFD_TYPE_RGBA RGBA pixels. Each pixel has four components in this order: red, green, blue, and alpha.
PFD_TYPE_COLORINDEXColor-index pixels. Each pixel uses a color-index value.
| Improve this Doc View Source

nSize

Specifies the size of this data structure. This value should be set to sizeof(PIXELFORMATDESCRIPTOR).

Declaration
public short nSize
Field Value
Type Description
System.Int16
| Improve this Doc View Source

nVersion

Specifies the version of this data structure. This value should be set to 1.

Declaration
public short nVersion
Field Value
Type Description
System.Int16
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX