Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Getting the palette of a D3DFMT_P8 texture

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 Shenjoku   Members   

161
Like
0Likes
Like

Posted 30 June 2012 - 05:11 PM

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.

#2 mhagain   Members   

13153
Like
1Likes
Like

Posted 30 June 2012 - 06:02 PM

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).

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#3 Shenjoku   Members   

161
Like
0Likes
Like

Posted 01 July 2012 - 08:16 PM

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.




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.