Getting the palette of a D3DFMT_P8 texture

Started by
1 comment, last by Shenjoku 11 years, 9 months ago
I'm working on an application that needs to support using P8 textures, but the way it needs to use them is by converting them into a 32-bit ARGB image. To do this I need to somehow get the palette of the texture after it has been loaded, but I can't find anything after looking through the DirectX docs.

So, does anyone know how to get the palette of a texture? That's the last piece of the puzzle I'm missing.
Advertisement
I believe that a P8 texture is just up-converted to ARGB32 at load-time; if so then there is no palette to get. Hardware support for palettized textures is very patchy these days (and has been for quite some time).

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.


I believe that a P8 texture is just up-converted to ARGB32 at load-time; if so then there is no palette to get. Hardware support for palettized textures is very patchy these days (and has been for quite some time).


You are correct. After spending a bit of time looking into the resulting texture data it is indeed being covereted to an equivelant of D3DFMT_A8R8G8B8. So this thread can be closed. Just need to treat the image as a 32-bit ARGB image and it's fine.

This topic is closed to new replies.

Advertisement