The LAYERPLANEDESCRIPTOR structure describes the pixel format of a drawing surface.
typedef struct tagLAYERPLANEDESCRIPTOR { // pfd
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 iLayerPlane
BYTE bReserved;
COLORREF crTransparent;
} LAYERPLANEDESCRIPTOR;
Value | Meaning |
---|---|
LPD_SUPPORT_OPENGL | The layer plane supports OpenGL drawing. |
LPD_SUPPORT_GDI | The layer plane supports GDI drawing. The current implementation of OpenGL doesn't support this flag. |
LPD_DOUBLEBUFFER | The layer plane is double-buffered. A layer plane can be double-buffered even when the main plane is single-buffered and vice versa. |
LPD_STEREO | The layer plane is stereoscopic. A layer plane can be stereoscopic even when the main plane is monoscopic and vice versa. |
LPD_SWAP_EXCHANGE | In a double-buffered layer plane, swapping the color buffer exchanges the front buffer and back buffer contents. The back buffer then contains the contents of the front buffer before the swap. This flag is a hint only and might not be provided by a driver. |
LPD_SWAP_COPY | In a double-buffered layer plane, swapping the color buffer copies the back buffer contents to the front buffer. The swap does not affect the back buffer contents. This flag is a hint only and might not be provided by a driver. |
LPD_TRANSPARENT | The crTransparent member of this structure contains a transparent color or index value that enables underlying layers to show through this layer. All layer planes, except the lowest-numbered underlay layer, have a transparent color or index. |
LPD_SHARE_DEPTH | The layer plane shares the depth buffer with the main plane. |
LPD_SHARE_STENCIL | The layer plane shares the stencil buffer with the main plane. |
LPD_SHARE_ACCUM | The layer plane shares the accumulation buffer with the main plane. |
Value | Meaning |
---|---|
LPD_TYPE_RGBA | RGBA pixels. Each pixel has four components: red, green, blue, and alpha. |
LPD_TYPE_COLORINDEX | Color-index pixels. Each pixel uses a color-index value. |
Please notice, as documented above, that certain layer plane properties are not supported in the current implementation. The implementation is the Microsoft GDI software implementation of OpenGL. Hardware manufacturers that enhance parts of OpenGL may support some layer plane properties not supported by the generic implementation.
OpenGL on Windows NT and Windows 95 Overview, Structures, PIXELFORMATDESCRIPTOR, wglCreateLayerContext, wglDescribeLayerPlane, wglGetLayerPaletteEntries, wglRealizeLayerPalette, wglSetLayerPaletteEntries, wglSwapLayerBuffers