Struct Gdi.PIXELFORMATDESCRIPTOR
- Namespace
- CADability
- Assembly
- CADability.dll
Managed image of the Windows PIXELFORMATDESCRIPTOR structure, which describes the pixel format of a drawing surface (color and depth buffer bits, double buffering, OpenGL support); used with ChoosePixelFormat(nint, ref PIXELFORMATDESCRIPTOR) and SetPixelFormat(nint, int, ref PIXELFORMATDESCRIPTOR) when an OpenGL rendering context is created.
public struct Gdi.PIXELFORMATDESCRIPTOR
- Inherited Members
Fields
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.
public byte bReserved
Field Value
cAccumAlphaBits
Specifies the number of alpha bitplanes in the accumulation buffer.
public byte cAccumAlphaBits
Field Value
cAccumBits
Specifies the total number of bitplanes in the accumulation buffer.
public byte cAccumBits
Field Value
cAccumBlueBits
Specifies the number of blue bitplanes in the accumulation buffer.
public byte cAccumBlueBits
Field Value
cAccumGreenBits
Specifies the number of green bitplanes in the accumulation buffer.
public byte cAccumGreenBits
Field Value
cAccumRedBits
Specifies the number of red bitplanes in the accumulation buffer.
public byte cAccumRedBits
Field Value
cAlphaBits
Specifies the number of alpha bitplanes in each RGBA color buffer. Alpha bitplanes are not supported.
public byte cAlphaBits
Field Value
cAlphaShift
Specifies the shift count for alpha bitplanes in each RGBA color buffer. Alpha bitplanes are not supported.
public byte cAlphaShift
Field Value
cAuxBuffers
Specifies the number of auxiliary buffers. Auxiliary buffers are not supported.
public byte cAuxBuffers
Field Value
cBlueBits
Specifies the number of blue bitplanes in each RGBA color buffer.
public byte cBlueBits
Field Value
cBlueShift
Specifies the shift count for blue bitplanes in each RGBA color buffer.
public byte cBlueShift
Field Value
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.
public byte cColorBits
Field Value
cDepthBits
Specifies the depth of the depth (z-axis) buffer.
public byte cDepthBits
Field Value
cGreenBits
Specifies the number of green bitplanes in each RGBA color buffer.
public byte cGreenBits
Field Value
cGreenShift
Specifies the shift count for green bitplanes in each RGBA color buffer.
public byte cGreenShift
Field Value
cRedBits
Specifies the number of red bitplanes in each RGBA color buffer.
public byte cRedBits
Field Value
cRedShift
Specifies the shift count for red bitplanes in each RGBA color buffer.
public byte cRedShift
Field Value
cStencilBits
Specifies the depth of the stencil buffer.
public byte cStencilBits
Field Value
dwDamageMask
Ignored. Earlier implementations of OpenGL used this member, but it is no longer used.
public int dwDamageMask
Field Value
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.
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.
public int dwFlags
Field Value
Remarks
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(nint, nint). | ||||||||||||||
| 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.
You can specify the following bit flags when calling ChoosePixelFormat(nint, ref PIXELFORMATDESCRIPTOR).
With the glAddSwapHintRectWIN extension function, two new flags are included for the PIXELFORMATDESCRIPTOR pixel format structure.
|
dwLayerMask
Ignored. Earlier implementations of OpenGL used this member, but it is no longer used.
public int dwLayerMask
Field Value
Remarks
Specifies the layer mask. The layer mask is used in conjunction with the visible mask to determine if one layer overlays another.
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.
public int dwVisibleMask
Field Value
iLayerType
Ignored. Earlier implementations of OpenGL used this member, but it is no longer used.
public byte iLayerType
Field Value
Remarks
Specifies the type of layer.
iPixelType
Specifies the type of pixel data. The following types are defined.
public byte iPixelType
Field Value
Remarks
| 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. |
nSize
Specifies the size of this data structure. This value should be set to sizeof(PIXELFORMATDESCRIPTOR).
public short nSize
Field Value
nVersion
Specifies the version of this data structure. This value should be set to 1.
public short nVersion