Freigeben über


D3DMFORMAT (Windows CE 5.0)

Send Feedback

This enumeration defines the various types of surface formats.

typedef enum _D3DMFORMAT {  D3DMFMT_UNKNOWN         =  0,  D3DMFMT_R8G8B8          =  1,  D3DMFMT_A8R8G8B8        =  2,  D3DMFMT_X8R8G8B8        =  3,  D3DMFMT_R5G6B5          =  4,  D3DMFMT_X1R5G5B5        =  5,  D3DMFMT_A1R5G5B5        =  6,  D3DMFMT_A4R4G4B4        =  7,  D3DMFMT_R3G3B2          =  8,  D3DMFMT_A8R3G3B2        =  9,  D3DMFMT_X4R4G4B4        = 10,  D3DMFMT_A8P8            = 11,  D3DMFMT_P8              = 12,  D3DMFMT_A8              = 13,  D3DMFMT_UYVY            = 14,  D3DMFMT_YUY2            = 15,  D3DMFMT_DXT1            = 16,  D3DMFMT_DXT2            = 17,  D3DMFMT_DXT3            = 18,  D3DMFMT_DXT4            = 19,  D3DMFMT_DXT5            = 20,  D3DMFMT_D32             = 21,  D3DMFMT_D15S1           = 22,  D3DMFMT_D24S8           = 23,  D3DMFMT_D16             = 24,  D3DMFMT_D24X8           = 25,  D3DMFMT_D24X4S4         = 26,  D3DMFMT_INDEX16         = 27,  D3DMFMT_INDEX32         = 28,  D3DMFMT_VERTEXDATA      = 29,  D3DMFMT_D3DMVALUE_FLOAT = 30,  D3DMFMT_D3DMVALUE_FIXED = 31,  D3DMFMT_NUMFORMAT       = 32,  D3DMFMT_FORCE_ULONG     = 0xFFFFFFFF} D3DMFORMAT;

Elements

  • D3DMFMT_UNKNOWN
    Surface format is unknown.
  • D3DMFMT_R8G8B8
    24-bit RGB pixel format.
  • D3DMFMT_A8R8G8B8
    32-bit ARGB pixel format with alpha.
  • D3DMFMT_X8R8G8B8
    32-bit RGB pixel format where 8 bits are reserved for each color.
  • D3DMFMT_R5G6B5
    16-bit RGB pixel format.
  • D3DMFMT_X1R5G5B5
    16-bit pixel format where 5 bits are reserved for each color.
  • D3DMFMT_A1R5G5B5
    16-bit pixel format where 5 bits are reserved for each color and 1 bit is reserved for alpha (transparent texel).
  • D3DMFMT_A4R4G4B4
    16-bit ARGB pixel format.
  • D3DMFMT_R3G3B2
    8-bit RGB texture format.
  • D3DMFMT_A8R3G3B2
    16-bit ARGB texture format.
  • D3DMFMT_X4R4G4B4
    16-bit RGB pixel format where 4 bits are reserved for each color.
  • D3DMFMT_A8P8
    Not supported in Windows CE.
  • D3DMFMT_P8
    Not supported in Windows CE.
  • D3DMFMT_A8
    8-bit alpha only.
  • D3DMFMT_UYVY
    UYVY format (PC98 compliance).
  • D3DMFMT_YUY2
    YUY2 format (PC98 compliance).
  • D3DMFMT_DXT1
    DXT1 compression texture format.
  • D3DMFMT_DXT2
    DXT2 compression texture format.
  • D3DMFMT_DXT3
    DXT3 compression texture format.
  • D3DMFMT_DXT4
    DXT4 compression texture format.
  • D3DMFMT_DXT5
    DXT5 compression texture format.
  • D3DMFMT_D32
    32-bit z-buffer bit depth.
  • D3DMFMT_D15S1
    16-bit z-buffer bit depth where 15 bits are reserved for the depth channel and 1 bit is reserved for the stencil channel.
  • D3DMFMT_D24S8
    32-bit z-buffer bit depth where 24 bits are reserved for the depth channel and 8 bits are reserved for the stencil channel.
  • D3DMFMT_D16
    16-bit z-buffer bit depth.
  • D3DMFMT_D24X8
    32-bit z-buffer bit depth where 24 bits are reserved for the depth channel.
  • D3DMFMT_D24X4S4
    32-bit z-buffer bit depth where 24 bits are reserved for the depth channel and 4 bits are reserved for the stencil channel.
  • D3DMFMT_INDEX16
    16-bit index buffer bit depth.
  • D3DMFMT_INDEX32
    32-bit index buffer bit depth.
  • D3DMFMT_VERTEXDATA
    Describes a vertex buffer surface.
  • D3DMFMT_D3DMVALUE_FLOAT
    Indicates that a D3DMVALUE is defined to be an IEEE 32-bit single precision floating point value.
  • D3DMFMT_D3DMVALUE_FIXED
    Indicates that a D3DMVALUE is defined as a 16.16 fixed point value. In this instance, 16.16 fixed point is defined to mean there is one sign bit, 15 bits of integer data, and 16 bits of fractional data.
  • D3DMFMT_NUMFORMAT
    Identifies the number of formats in the D3DMFORMAT enumeration. You can use this enumeratoin element as the upper bound to loop through all the elements of the enumeration.
  • D3DMFMT_FORCE_ULONG
    Forces the compiler to interpret the enumeration as a ULONG value. This value is not used directly in Direct3D Mobile programming.

Remarks

The following table describes the naming convention for the elements of D3DMFORMAT.

Character Description
A The number of bits for the alpha component.
R The number of bits for the red color component.
G The number of bits for the green color component.
B The number of bits for the blue color component.
X The number of unused bits.
P The number of bits for palletized colors.
S The number of stencil bits.
D The umber of depth bits.

The characters in the element names are organized so the most significant bits are first. For example, D3DMFMT_A8P8 indicates that the high byte of this two-byte format is alpha.

For formats relating to depth and stencil buffers, the element naming does not indicate a particular bit order per pixel. These formats are also not lockable by applications. Drivers can consume more than the indicated number of bits per depth channel, but not more than the indicated number of bits per stencil channel.

Render target formats are restricted to D3DMFMT_X1R5G5B5, D3DMFMT_R5G6B5, D3DMFMT_X8R8G8B8, and D3DMFMT_A8R8G8B8.

Pixel formats are denoted by opaque DWORD identifiers. The format of these DWORDs has been chosen to enable the expression of IHV-defined extension formats, and also to include the well-established FOURCC method. The set of formats understood by the Microsoft® Direct3D Mobile® middleware is defined by D3DMFORMAT.

Note that IHV-supplied formats and many FOURCC codes are not listed in the D3DMFORMAT enumeration. The formats in this enumeration are unique in that they are sanctioned by the middleware, meaning that the reference driver operates on all these types. The IHV-supplied formats are supported by individual IHVs on a card-by-card basis.

Requirements

OS Versions: Windows CE 5.0 and later.
Header: D3dmtypes.h.

See Also

Direct3D Mobile Enumerations | D3DMVALUE

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.