次の方法で共有


D3DFORMAT

This enumeration defines the various types of surface formats.

typedef enum _D3DFORMAT {
  D3DFMT_UNKNOWN = 0,
  D3DFMT_R8G8B8 = 20,
  D3DFMT_A8R8G8B8 = 21,
  D3DFMT_X8R8G8B8 = 22,
  D3DFMT_R5G6B5 = 23,
  D3DFMT_X1R5G5B5 = 24,
  D3DFMT_A1R5G5B5 = 25,
  D3DFMT_A4R4G4B4 = 26,
  D3DFMT_R3G3B2 = 27,
  D3DFMT_A8 = 28,
  D3DFMT_A8R3G3B2 = 29,
  D3DFMT_X4R4G4B4 = 30,
  D3DFMT_A8P8 = 40,
  D3DFMT_P8 = 41,
  D3DFMT_L8 = 50,
  D3DFMT_A8L8 = 51,
  D3DFMT_A4L4 = 52,
  D3DFMT_V8U8 = 60,
  D3DFMT_L6V5U5 = 61,
  D3DFMT_X8L8V8U8 = 62,
  D3DFMT_Q8W8V8U8 = 63,
  D3DFMT_V16U16 = 64,
  D3DFMT_W11V11U10 = 65,
  D3DFMT_UYVY = MAKEFOURCC('U', 'Y', 'V', 'Y'),
  D3DFMT_YUY2 = MAKEFOURCC('Y', 'U', 'Y', '2'),
  D3DFMT_DXT1 = MAKEFOURCC('D', 'X', 'T', '1'),
  D3DFMT_DXT2 = MAKEFOURCC('D', 'X', 'T', '2'),
  D3DFMT_DXT3 = MAKEFOURCC('D', 'X', 'T', '3'),
  D3DFMT_DXT4 = MAKEFOURCC('D', 'X', 'T', '4'),
  D3DFMT_DXT5 = MAKEFOURCC('D', 'X', 'T', '5'),
  D3DFMT_D16_LOCKABLE = 70,
  D3DFMT_D32 = 71,
  D3DFMT_D15S1 = 73,
  D3DFMT_D24S8 = 75,
  D3DFMT_D16 = 80,
  D3DFMT_D24X8 = 77,
  D3DFMT_D24X4S4 = 79,
  D3DFMT_VERTEXDATA = 100,
  D3DFMT_INDEX16 = 101,
  D3DFMT_INDEX32 = 102,
  D3DFMT_FORCE_DWORD = 0xFFFFFFFF
} D3DFORMAT;

Constants

  • D3DFMT_UNKNOWN
    Surface format is unknown.
  • D3DFMT_R8G8B8
    24-bit RGB pixel format.
  • D3DFMT_A8R8G8B8
    32-bit ARGB pixel format with alpha.
  • D3DFMT_X8R8G8B8
    32-bit RGB pixel format where 8 bits are reserved for each color.
  • D3DFMT_R5G6B5
    16-bit RGB pixel format.
  • D3DFMT_X1R5G5B5
    16-bit pixel format where 5 bits are reserved for each color.
  • D3DFMT_A1R5G5B5
    16-bit pixel format where 5 bits are reserved for each color and 1 bit is reserved for alpha (transparent texel).
  • D3DFMT_A4R4G4B4
    16-bit ARGB pixel format.
  • D3DFMT_R3G3B2
    8-bit RGB texture format.
  • D3DFMT_A8
    8-bit alpha only.
  • D3DFMT_A8R3G3B2
    16-bit ARGB texture format.
  • D3DFMT_X4R4G4B4
    16-bit RGB pixel format where 4 bits are reserved for each color.
  • D3DFMT_A8P8
    Not supported in Windows CE.
  • D3DFMT_P8
    Not supported in Windows CE.
  • D3DFMT_L8
    8-bit luminance only.
  • D3DFMT_A8L8
    16-bit alpha luminance.
  • D3DFMT_A4L4
    8-bit alpha luminance.
  • D3DFMT_V8U8
    Not supported.
  • D3DFMT_L6V5U5
    Not supported.
  • D3DFMT_X8L8V8U8
    Not supported.
  • D3DFMT_Q8W8V8U8
    Not supported.
  • D3DFMT_V16U16
    Not supported.
  • D3DFMT_W11V11U10
    Not supported.
  • D3DFMT_UYVY
    UYVY format (PC98 compliance).
  • D3DFMT_YUY2
    YUY2 format (PC98 compliance).
  • D3DFMT_DXT1
    DXT1 compression texture format.
  • D3DFMT_DXT2
    DXT2 compression texture format.
  • D3DFMT_DXT3
    DXT3 compression texture format.
  • D3DFMT_DXT4
    DXT4 compression texture format.
  • D3DFMT_DXT5
    DXT5 compression texture format.
  • D3DFMT_D16_LOCKABLE
    16-bit z-buffer bit depth. This is an application-lockable surface format.
  • D3DFMT_D32
    32-bit z-buffer bit depth.
  • D3DFMT_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.
  • D3DFMT_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.
  • D3DFMT_D16
    16-bit z-buffer bit depth.
  • D3DFMT_D24X8
    32-bit z-buffer bit depth where 24 bits are reserved for the depth channel.
  • D3DFMT_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.
  • D3DFMT_VERTEXDATA
    Describes a vertex buffer surface.
  • D3DFMT_INDEX16
    16-bit index buffer bit depth.
  • D3DFMT_INDEX32
    32-bit index buffer bit depth.
  • D3DFMT_FORCE_DWORD
    Forces this enumeration to compile to 32 bits in size. This value is not used.

Remarks

Note that render target formats are restricted to D3DFMT_X1R5G5B5, D3DFMT_R5G6B5, D3DFMT_X8R8G8B8, and D3DFMT_A8R8G8B8.

The order of the bits is from the most significant bit (MSB) first, so D3DFMT_A8L8 indicates that the high byte of this two-byte format is alpha. D3DFMT_D16 indicates a 16-bit integer value and an application-lockable surface.

All depth-stencil formats except D3DFMT_D16_LOCKABLE indicate no particular bit ordering per pixel, and are not application-lockable, and the driver is allowed to consume more than the indicated number of bits per depth channel (but not stencil channel).

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® runtime is defined by D3DFORMAT.

Note that IHV-supplied formats and many FOURCC codes are not listed in the D3DFORMAT enumeration. The formats in this enumeration are unique in that they are sanctioned by the runtime, meaning that the reference rasterizer will operate on all these types. The IHV-supplied formats will be supported by the individual IHVs on a card-by-card basis.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: D3d8types.h.

See Also

Four-Character Codes (FOURCC) | IDirect3D8::CheckDeviceFormat

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.