请问使用CreateTextureFromFileEx载入图像怎么改调色板?我已经用SetPaletteEntries、SetCurrentTexturePalette设置并指定调色板,
但是还没有任何效果,请高人指点。

解决方案 »

  1.   

    看了一下SDK:
    Palette 
    The first element of an array of 256 PALETTEENTRY types to fill in, or ByVal 0. See Res. Res
    Mipmapped textures will automatically have each level filled with the loaded texture.When loading images into mipmapped textures, some video cards are unable to go to a 1x1 image and this function will fail. If this happens, then the images need to be loaded manually.For more information on PALETTEENTRY see the Microsoft Platform Software Development Kit (SDK). Note that as of Microsoft DirectX® 8.0, the peFlags member of the PALETTEENTRY structure does not work the way it is documented in the Platform SDK. The peFlags member is now the alpha channel for 8-bit palletized formats