Page 1 of 1

Simple DDS loader

Posted: Tue Jun 23, 2009 8:15 am
by egrath
Hello,
for a project of mine i needed the ability to load DDS Textures in Irrlicht. The result was a little and simple to use library which does:
  • Load a DDS File and return a *IImage
  • Supports DXT1/3
  • No dependencies to other libraries (except Irrlicht :-)
The entire DXT decoding is based around FFmpeg's s3tc.c implementation which has been additionally licensed under the Terms of the ZLIB license by the original author (Ivo van Poorten). My code is also licensed under the terms of the ZLIB.

Download it here: http://egonrath.eg.funpic.de/wordpress/?p=376
Mirror: http://rapidshare.de/files/47641084/DdsTool.7z.html

Greetings,
Egon

/edit: Updated links and license

Posted: Tue Jun 23, 2009 8:19 am
by BlindSide
Nice job. I'll see if I can get this into Irrlicht somehow (Although the IImage system is due for a long overhaul so we may just wait until then).

Posted: Tue Jun 23, 2009 10:33 am
by CuteAlien
DDS is certainly a features often missed. I think I've also seen 2 other implementations on the forums trying to fix that. One from festini was for an older Irrlicht and worked only for OpenGL, but also had a loader. I think the other was from Nadro, I haven't checked out that one yet.

@BlindSide: Be careful, we can't use LGPL code in Irrlicht.

Posted: Tue Jun 23, 2009 11:18 am
by BlindSide
Ah I missed the license part, nevermind then.

Posted: Tue Jun 23, 2009 12:22 pm
by egrath
Hello,
if LGPL is a problem i can implement the S3TC decoding from scratch and relicense under the zlib license. Just let me know.
Egon

Posted: Tue Jun 23, 2009 2:12 pm
by hybrid
LGPL cannot be included into Irrlicht, as it would require shared objects for those parts. So this code cannot be put into Irrlicht as is.

Posted: Tue Jun 23, 2009 6:43 pm
by egrath
Hello,

i've contacted the author of the parts not written by me and he told me that he additionally releases his components (s3tc.c and s3tc.h) under the Terms of the ZLIB License for inclusion in Irrlicht.

Tomorrow i will upload a new Release of the Library licensed under the terms of ZLIB at its entire.

Greetings,
Egon

Posted: Tue Jun 23, 2009 7:39 pm
by sio2
BlindSide wrote:Nice job. I'll see if I can get this into Irrlicht somehow (Although the IImage system is due for a long overhaul so we may just wait until then).
What we need is native dds support - decoding on load is far less useful, if that is what this is.

Posted: Tue Jun 23, 2009 8:51 pm
by Dorth
Thanks egrat for taking the extra time to get a compatible license (and do carry my thanks to the author of the code you used for allowing it too if you talk to him again)

That's a nice gesture.

10 robot pieces to each of you.

Posted: Tue Jun 23, 2009 10:59 pm
by BlindSide
sio2 wrote:
BlindSide wrote:Nice job. I'll see if I can get this into Irrlicht somehow (Although the IImage system is due for a long overhaul so we may just wait until then).
What we need is native dds support - decoding on load is far less useful, if that is what this is.
Yes I agree, but it's not really possible at the moment. The only easy way out is to compress it ourselves at runtime.

Posted: Wed Jun 24, 2009 5:28 am
by egrath
Hello,
the license for the entire library has been changed to ZLIB. Updated links are in the first post.
Egon