Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


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: 1447

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: 2433

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: 13924

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


It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#4 Aliii   Members   -  Reputation: 1447

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