Platform SDK: DirectX

Texture-Map Formats

A wide range of texture pixel formats are supported by the hardware emulation layer (HEL). The following table shows these formats. The Masks column contains the red, green, blue, and alpha masks for each set of pixel format flags and bit depths.

Pixel format flags Bit depth Masks
DDPF_RGB |
DDPF_PALETTEINDEXED1
1 R: 0x00000000
G: 0x00000000
B: 0x00000000
A: 0x00000000
DDPF_RGB |
DDPF_PALETTEINDEXED1 |
DDPF_PALETTEINDEXEDTO8
1 R: 0x00000000
G: 0x00000000
B: 0x00000000
A: 0x00000000
DDPF_RGB |
DDPF_PALETTEINDEXED2
2 R: 0x00000000
G: 0x00000000
B: 0x00000000
A: 0x00000000
DDPF_RGB |
DDPF_PALETTEINDEXED2 |
DDPF_PALETTEINDEXEDTO8
2 R: 0x00000000
G: 0x00000000
B: 0x00000000
A: 0x00000000
DDPF_RGB |
DDPF_PALETTEINDEXED4
4 R: 0x00000000
G: 0x00000000
B: 0x00000000
A: 0x00000000
DDPF_RGB |
DDPF_PALETTEINDEXED4 |
DDPF_PALETTEINDEXEDTO8
4 R: 0x00000000
G: 0x00000000
B: 0x00000000
A: 0x00000000
DDPF_RGB |
DDPF_PALETTEINDEXED8
8 R: 0x00000000
G: 0x00000000
B: 0x00000000
A: 0x00000000
DDPF_RGB 8 R: 0x000000E0
G: 0x0000001C
B: 0x00000003
A: 0x00000000
DDPF_RGB |
DDPF_ALPHAPIXELS
16 R: 0x00000F00
G: 0x000000F0
B: 0x0000000F
A: 0x0000F000
DDPF_RGB 16 R: 0x0000F800
G: 0x000007E0
B: 0x0000001F
A: 0x00000000
DDPF_RGB 16 R: 0x0000001F
G: 0x000007E0
B: 0x0000F800
A: 0x00000000
DDPF_RGB 16 R: 0x00007C00
G: 0x000003E0
B: 0x0000001F
A: 0x00000000
DDPF_RGB |
DDPF_ALPHAPIXELS
16 R: 0x00007C00
G: 0x000003E0
B: 0x0000001F
A: 0x00008000
DDPF_RGB 24 R: 0x00FF0000
G: 0x0000FF00
B: 0x000000FF
A: 0x00000000
DDPF_RGB 24 R: 0x000000FF
G: 0x0000FF00
B: 0x00FF0000
A: 0x00000000
DDPF_RGB 32 R: 0x00FF0000
G: 0x0000FF00
B: 0x000000FF
A: 0x00000000
DDPF_RGB 32 R: 0x000000FF
G: 0x0000FF00
B: 0x00FF0000
A: 0x00000000
DDPF_RGB |
DDPF_ALPHAPIXELS
32 R: 0x00FF0000
G: 0x0000FF00
B: 0x000000FF
A: 0xFF000000
DDPF_RGB |
DDPF_ALPHAPIXELS
32 R: 0x000000FF
G: 0x0000FF00
B: 0x00FF0000
A: 0xFF000000

The HEL can create these formats in system memory. The DirectDraw device driver for a 3-D-accelerated display card can create textures of other formats in display memory. Such a driver exports the DDSCAPS_TEXTURE flag to indicate that it can create textures.