UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NS:ddraw._DDPIXELFORMAT |
DDPIXELFORMAT (ddraw.h) |
The DDPIXELFORMAT structure describes the pixel format of a DirectDrawSurface object for the IDirectDrawSurface7::GetPixelFormat method. |
|
directdraw\ddpixelformat.htm |
directdraw |
17c531cb-7e65-482a-b3de-494874c1dd92 |
12/05/2018 |
*LPDDPIXELFORMAT, DDPF_ALPHA, DDPF_ALPHAPIXELS, DDPF_ALPHAPREMULT, DDPF_BUMPDUDV, DDPF_BUMPLUMINANCE, DDPF_COMPRESSED, DDPF_D3DFORMAT, DDPF_FOURCC, DDPF_LUMINANCE, DDPF_PALETTEINDEXED1, DDPF_PALETTEINDEXED2, DDPF_PALETTEINDEXED4, DDPF_PALETTEINDEXED8, DDPF_PALETTEINDEXEDTO8, DDPF_RGB, DDPF_RGBTOYUV, DDPF_STENCILBUFFER, DDPF_YUV, DDPF_ZBUFFER, DDPF_ZPIXELS, DDPIXELFORMAT, DDPIXELFORMAT structure [DirectDraw], LPDDPIXELFORMAT, LPDDPIXELFORMAT structure pointer [DirectDraw], ddraw/DDPIXELFORMAT, ddraw/LPDDPIXELFORMAT, directdraw.ddpixelformat |
ddraw.h |
Windows |
Windows |
DDPIXELFORMAT |
19H1 |
|
|
|
|
|
|
The DDPIXELFORMAT structure describes the pixel format of a DirectDrawSurface object for the IDirectDrawSurface7::GetPixelFormat method.
Size of the structure, in bytes. This member must be initialized before the structure is used.
The following flags to describe optional controls for this structure.
The pixel format describes an alpha-only surface.
The surface has alpha channel information in the pixel format.
The surface uses the premultiplied alpha format. That is, the color components in each pixel are premultiplied by the alpha component.
The luminance data in the pixel format is valid, and the dwLuminanceBitMask member describes valid luminance bits for a luminance-only or luminance-alpha surface.
Bump-map data in the pixel format is valid. Bump-map information is in the dwBumpBitCount, dwBumpDuBitMask, dwBumpDvBitMask, and dwBumpLuminanceBitMask members.
The surface accepts pixel data in the specified format and compress it during the write operation.
Indicates a DirectX 8.0 and later format capability entry in the texture format list. This flag is not exposed to applications and is defined in Ddrawi.h.
The dwFourCC member is valid and contains a FOURCC code that describes a non-RGB pixel format.
The pixel format describes a luminance-only or luminance-alpha surface.
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 accepts RGB data and translates it during the write operation to YUV data. The format of the data to be written is contained in the pixel format structure. The DDPF_RGB flag is set.
The surface encodes stencil and depth information in each pixel of the z-buffer. This flag can be used only if the DDPF_ZBUFFER flag is also specified.
The YUV data in the pixel format structure is valid.
The pixel format describes a z-buffer surface.
The surface contains z information in the pixels.
A FourCC code.
RGB bits per pixel (4, 8, 16, 24, or 32).
YUV bits per pixel (4, 8, 16, 24, or 32).
Z-buffer bit depth (8, 16, 24, or 32).
Alpha channel bit depth (1, 2, 4, or 8) for an alpha-only surface (DDPF_ALPHA). For pixel formats that contain alpha information interleaved with color data (DDPF_ALPHAPIXELS), count the bits in the dwRGBAlphaBitMask member to obtain the bit depth of the alpha component. For more information about how to determine alpha bit depth, see Remarks.
Total luminance bits per pixel. This member applies only to luminance-only and luminance-alpha surfaces.
Total bump-map bits per pixel in a bump-map surface.
Bits per pixel of private driver formats. Only valid in texture format list and if DDPF_D3DFORMAT is set.
Mask for red bits.
Mask for Y bits.
Bit depth of the stencil buffer. This member specifies how many bits are reserved within each pixel of the z-buffer for stencil information (the total number of z-bits is equal to dwZBufferBitDepth minus dwStencilBitDepth).
Mask for luminance bits.
Mask for bump-map U-delta bits.
Flags that specify the operations that can be performed on surfaces with the DDPF_D3DFORMAT pixel format. The flags are defined in Ddrawi.h.
Mask for green bits.
Mask for U bits.
Mask for z bits.
Mask for bump-map V-delta bits.
A structure that contains the following two members. This structure is used to specify surfaces that can be used when performing multisample rendering. Each bit in the 16-bit masks indicates support of multisampling with a specific number of samples. For example, bit 0 indicates support of multisampling with only a single sample, bit 1 indicates the support of multisampling with two samples, and so on. The driver can indicate more than one supported level by combining the bits by using a bitwise OR.
A 16-bit mask for full-screen (flip) mode multisampling.
A 16-bit mask for windowed (bit-block transfer) mode multisampling.
Mask for blue bits.
Mask for V bits.
Mask for stencil bits within each z-buffer pixel.
Mask for luminance in a bump-map pixel.
RGB mask for the alpha channel.
YUV mask for the alpha channel.
Luminance mask for the alpha channel.
RGB mask for the z channel.
YUV mask for the z channel.
The dwAlphaBitDepth member reflects the bit depth of an alpha-only pixel format (DDPF_ALPHA). For pixel formats that include the alpha component with color components (DDPF_ALPHAPIXELS), the alpha bit depth is obtained by counting the bits in the various mask members. The following code example returns the number of bits set in a given bitmask.
WORD GetNumberOfBits( DWORD dwMask )
{
WORD wBits = 0;
while( dwMask )
{
dwMask = dwMask & ( dwMask - 1 );
wBits++;
}
return wBits;
}
The unions in DDPIXELFORMAT have been updated to work with compilers that do not support nameless unions. If your compiler does not support nameless unions, define the NONAMELESSUNION token before including the Ddraw.h header file.