Windows Dev Center

Expand Minimize

Device.SetPaletteEntries(Int32,PaletteEntry[]) Method (Microsoft.DirectX.Direct3D)

Sets palette entries.

Definition

Visual BasicPublic Sub SetPaletteEntries( _
    ByVal paletteNumber As Integer, _
    ByVal entries() As PaletteEntry _
)
C#public void SetPaletteEntries(
    int paletteNumber,
    PaletteEntry[] entries
);
C++public:
void SetPaletteEntries(
    int paletteNumber,
    array<PaletteEntry>^ entries
);
JScriptpublic function SetPaletteEntries(
    paletteNumber : int,
    entries : PaletteEntry[]
);

Parameters

paletteNumber System.Int32
Ordinal value that identifies the palette on which the operation is performed.
entries Microsoft.DirectX.Direct3D.PaletteEntry[]
Pointer to a PaletteEntry structure that represents the palette entries to set. The number of PaletteEntry structures passed into param_PaletteEntryA_entries is assumed to be 256. See Remarks.

Remarks

For Microsoft DirectX 9.0 applications, any palette sent to this method must conform to the TextureCaps.SupportsAlphaPalette capability bit of Caps.TextureCaps. If TextureCaps.SupportsAlphaPalette is not set, every entry in the palette must have alpha set to 1.0, or this method will fail and throw an InvalidCallException. If TextureCaps.SupportsAlphaPalette is set, any set of alpha values is allowed. Note that the debug runtime prints a warning message if all palette entries have alpha set to 0.

A single logical palette is associated with the device, and is shared by all texture stages.

Exceptions
InvalidCallException The method call is invalid. For example, a method's parameter might contain an invalid value.

See Also

Show:
© 2015 Microsoft