Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


DDS loader and question


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
3 replies to this topic

#1 Aliii   Members   -  Reputation: 1448

Like
0Likes
Like

Posted 17 February 2014 - 11:10 AM

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, 17 February 2014 - 11:25 AM.


Sponsor:

#2 Chris_F   Members   -  Reputation: 2651

Like
2Likes
Like

Posted 17 February 2014 - 11:59 AM

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

 

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



#3 L. Spiro   Crossbones+   -  Reputation: 18115

Like
2Likes
Like

Posted 18 February 2014 - 03:55 PM

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



#4 Aliii   Members   -  Reputation: 1448

Like
0Likes
Like

Posted 18 February 2014 - 06:48 PM

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






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.



PARTNERS