Device.CurrentTexturePalette Property

Language:

Retrieves or sets the current texture palette.

Definition

Visual Basic Public Property CurrentTexturePalette As Integer
C# public int CurrentTexturePalette { get; set; }
C++ public:
property int CurrentTexturePalette {
        int get();
        void set(int value);
}
JScript public function get CurrentTexturePalette() : int
public function set CurrentTexturePalette(int);

Property Value

System.Int32
Current texture palette.

This property is read/write. 

Remarks

Microsoft Direct3D for Microsoft DirectX 9.0 supports paletted textures through a set of 256 entry palettes associated with the Device object. A palette is made current by setting the Device.CurrentTexturePalette property. The current palette is used for translating all paletted textures for all active texture stages. Device.SetPaletteEntries updates all 256 of a palette's entries, each of which is a PaletteEntry object formatted with Format.A8R8G8B8. By default, all entries are set to 0xFFFFFFFF.

The Device palettes contain an alpha channel, which can be used when the TextureCaps.SupportsAlphaPalette device capability flag is set, indicating that the device supports alpha from the palette. The palette alpha channel is used when the texture format does not have an alpha channel. If the device does not support alpha from the palette and the texture format does not have an alpha channel, a value of 0xFF is used for alpha.

A maximum of 65,536 (0x0000FFFF) palettes is allowed. Because memory resources associated with the set of palettes are proportional to the maximum palette number that an application references, use contiguous palette numbers starting at zero.


Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center