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;
Describes the pixel format of a DirectDrawSurface object.
Size of the structure. This must be initialized before the structure is used.
Specifies the optional control flags.
The pixel format describes an alpha-only surface.
The surface has alpha-channel information in the pixel format.
The surface will accept pixel data in the specified format and compress it during the write operation.
The FourCC code is valid.
The surface is 1-bit color indexed.
The surface is 2-bit color indexed.
The surface is 4-bit color indexed.
The surface is 8-bit color indexed.
The surface is 1-, 2-, or 4-bit color indexed to an 8-bit palette.
The RGB data in the pixel format structure is valid.
The surface will accept RGB data and translate it during the write operation 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.
The YUV data in the pixel format structure is valid.
The pixel format describes a z-buffer-only surface.
FourCC code.
RGB bits per pixel (DDBD_4,8,16,24,32)
YUV bits per pixel (DDBD_4,8,16,24,32)
Z-buffer bit depth. (DDBD_8,16,24,32)
Alpha channel bit depth. (DDBD_1,2,4,8)
Mask for red bits.
Mask for Y bits.
Mask for green bits.
Mask for U bits.
Mask for blue bits.
Mask for V bits.
Mask for alpha channel.
Mask for alpha channel.