Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

GTL Stuff...

Sign in to follow this  


or "How I learnt to stop worrying and blame MS for everything".

Now, online there is a handy set of docs in MSDN about the layout of the DDS file.

In these files is the line;

For simple uncompressed textures, a .dds file should contain DDSD_PITCH and a DDPF_RGB pixel format surface. The pitch value should be DWORD-aligned. In this case, the main image should be (dwPitchOrLinearSize-by-dwHeight) bytes total.

"Excellent", thinks I, "I can use that to detect uncompressed DDS files and work out their size".

So, I go ahead and code it and all is good with the world.

Today I get my attension drawn to uncompressed DDS files and I figure I should test my code with them, so firstly I try to use the compressonator from ATI to produce an compressed mipmap'd DDS, however it doesnt let me.
So I ask on #graphicsdev and get pointed at MS's own DX Texture Tool, which yes does allow me to build a mipmap chain and save the image.

So I do so, make the adjustments needed, hit run and promptly get dumpped out with an assert on the ptr to the image data being null.

Much investing later and it turns out that MS's own texture tool doesnt correctly write the headers! The flags section of the header doesnt have the DDSPITCH flag set!

Time to work out another way to detect it...
Sign in to follow this  

1 Comment

Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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!