Microsoft DirectX 9.0 |
This structure describes the pixel format of a DirectDrawSurface object.
typedef struct _DDPIXELFORMAT{
DWORD dwSize;
DWORD dwFlags;
DWORD dwFourCC;
union
{
DWORD dwRGBBitCount;
DWORD dwYUVBitCount;
DWORD dwZBufferBitDepth;
DWORD dwAlphaBitDepth;
};
union
{
DWORD dwRBitMask;
DWORD dwYBitMask;
};
union
{
DWORD dwGBitMask;
DWORD dwUBitMask;
};
union{
DWORD dwBBitMask;
DWORD dwVBitMask;
};
union
{
DWORD dwRGBAlphaBitMask;
DWORD dwYUVAlphaBitMask;
};
} DDPIXELFORMAT, FAR* LPDDPIXELFORMAT;
Members
dwSize
Size of the structure. Must be initialized prior to use.
dwFlags
Flag | Description |
DDPF_ALPHAPIXELS | The surface has alpha channel information in the pixel format. |
DDPF_ALPHA | The pixel format describes an alpha-only surface. |
DDPF_FOURCC | The FourCC code is valid. |
DDPF_PALETTEINDEXED4 | The surface is 4-bit color indexed. |
DDPF_PALETTEINDEXED4TO8 | The surface is 4-bit color indexed to an 8-bit palette. |
DDPF_PALETTEINDEXED8 | The surface is 8-bit color indexed. |
DDPF_RGB | The RGB data in the pixel format structure is valid. |
DDPF_COMPRESSED | The surface will accept pixel data in the specified format and compress it during the write. |
DDPF_RGBTOYUV | The surface will accept RGB data and translate it during the write to YUV data. The format of the data to be written will be contained in the pixel format structure. The DDPF_RGB flag will be set. |
DDPF_YUV | The YUV data in the pixel format structure is valid. |
DDPF_ZBUFFER | The pixel format describes a z buffer only surface. |
dwFourCC
FOURCC code.
dwRGBBitCount
RGB bits per pixel. (DDBD_4,8,16,24,32)
dwYUVBitCount
YUV bits per pixel. (DDBD_4,8,16,24,32)
dwZBufferBitDepth
Z buffer bit depth. (DDBD_8,16,24,32)
dwAlphaBitDepth
Alpha channel bit depth. (DDBD_1,2,4,8)
dwRBitMask
Mask for red bits.
dwYBitMask
Mask for Y bits.
dwGBitMask
Mask for green bits.
dwUBitMask
Mask for U bits.
dwBBitMask
Mask for blue bits.
dwVBitMask
Mask for V bits.
dwRGBAlphaBitMask
Mask for alpha channel.
dwYUVAlphaBitMask
Mask for alpha channel.
See Also