• Advertisement
Sign in to follow this  

DDS loader and question

This topic is 1432 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

Im looking for a DDS loader. A simple one that can handle DXT 1/3/5 compressed and uncompressed, ....and is free and open source. C or C++. (I dont need a complex library that can handle png, jpg, ....just DDS.)

 

Now, ....how do you solve the flipping part? Save it flipped, flip it in software, or use a magical flip extension that I dont know about?

Thanks!

 

Edit: ....or use a shader trick?

Edited by Aliii

Share this post


Link to post
Share on other sites
Advertisement

Loading is a matter of loading the file to memory, casting a few structures over it, and copying data from calculated offsets to the API.

http://msdn.microsoft.com/en-us/library/windows/desktop/bb943991(v=vs.85).aspx

 

DDS files are stored the same as every other image file except BMP: Y axis not inverted.

So why would you need to flip only DDS files?

 

In OpenGL you need to flip all images except BMP, not just DDS, and you do so by modifying the UV coordinates:

UV.y = 1 - UV.y

 

 

L. Spiro

Share this post


Link to post
Share on other sites

Thanks! There are many threads about DDS and how the different directx/opengl coord systems are being a problem. Then I guess its not:)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement