Microsoft DirectX 8.1 (C++) |
Sets palette entries.
HRESULT SetPaletteEntries( UINT PaletteNumber, CONST PALETTEENTRY* pEntries );
If the method succeeds, the return value is D3D_OK.
If the method fails, the return value can be D3DERR_INVALIDCALL.
For Microsoft® DirectX® 8.1 applications, any palette sent to this method must conform to the D3DPTEXTURECAPS_ALPHAPALETTE capability bit of the D3DCAPS8 structure. If D3DPTEXTURECAPS_ALPHAPALETTE is not set, every entry in the palette must have alpha set to 1.0 or this method will fail with D3DERR_INVALIDCALL. If D3DPTEXTUECAPS_ALPHAPALETTE is set, then any set of alpha values are allowed. Note that the debug runtime will print 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.
Header: Declared in D3d8.h.
Import Library: Use D3d8.lib.
IDirect3DDevice8::GetCurrentTexturePalette, IDirect3DDevice8::GetPaletteEntries, IDirect3DDevice8::SetCurrentTexturePalette, Texture Palettes