Поделиться через


Device.CurrentTexturePalette Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets or sets the current texture palette.

Namespace:  Microsoft.WindowsMobile.DirectX.Direct3D
Assembly:  Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)

Syntax

'Declaration
Public Property CurrentTexturePalette As Integer
    Get
    Set
'Usage
Dim instance As Device
Dim value As Integer

value = instance.CurrentTexturePalette

instance.CurrentTexturePalette = value
public int CurrentTexturePalette { get; set; }
public:
property int CurrentTexturePalette {
    int get ();
    void set (int value);
}
member CurrentTexturePalette : int with get, set

Property Value

Type: System.Int32
Current texture palette.

Remarks

You can use paletted textures through a set of 256 entry palettes associated with the Device structure. A palette is made current by setting the CurrentTexturePalette property. The current palette is used for translating all paletted textures for all active texture stages. SetPaletteEntries updates all 256 entries of a palette, each of which is a PaletteEntry object formatted with A8R8G8B8. By default, all entries are set to 0xFFFFFFFF.

The Device palettes contain an alpha channel, which can be used when the SupportsAlphaPalette 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.

.NET Framework Security

Platforms

Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Compact Framework

Supported in: 3.5, 2.0

See Also

Reference

Device Class

Device Members

Microsoft.WindowsMobile.DirectX.Direct3D Namespace