DDS loader and question

Started by
2 comments, last by Aliii 10 years, 2 months ago

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?

Advertisement

http://www.g-truc.net/project-0024.html

Haven't used it myself, but I do use GLM regularly.

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

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

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

This topic is closed to new replies.

Advertisement