Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

dragon9

Texture Formats

This topic is 5909 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am using D3DXCreateTextureFromFileEx to load my textures. I saved the textures as 8 bit color indexed TGAs and then specified the loading format as D3DFMT_UNKNOWN so the function would auto detect and set the appropriate format. According to the D3DSURFACE_DESC returned by the texture though, everything was loaded with the D3DFMT_A8R8G8B8 format. I tried forcing the D3DFMT_P8 and at least got the textures to load as D3DFMT_R5G6B5. So what am I doing wrong? What I want is 8 bit paletized data, or any other form of 8 bit data. How do I get it?

Share this post


Link to post
Share on other sites
Advertisement
Make sure you are not passing in NULL for the pPalette parameter. Without it, D3DXCreateTextureFromFileEx will always depaletteize your image, since it has no way to return the palette.

xyzzy

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!