nothings / stb

stb single-file public domain libraries for C/C++
https://twitter.com/nothings
Other
26.8k stars 7.72k forks source link

dds support #518

Closed nothings closed 4 years ago

nothings commented 6 years ago

Add a dds loader, but not same model as HDR loader--we do not support converting to RGBA. It's really just there as a helper function for people who are writing 3D-accelerated games, because it's a poor use of everyone's time for them to not have this.

raysan5 commented 6 years ago

In raylib I implemented support for DDS, PKM, KTX, PVR and ASTC data loading. Maybe any of those could be useful: https://github.com/raysan5/raylib/blob/master/src/textures.c#L2087

nothings commented 6 years ago

@raysan5 License means I can't use your code, but thanks.

Krakean commented 6 years ago

@nothings any progress on this? :) Would be nice to have support for DXT1/3/5, at least. Ideally - with BC6H & BC7.

kphillisjr commented 6 years ago

I know that the DDS file format is well documented ( see: DDS on Microsoft Developers Network). This should help with implementing the dds file format after using the recent source release by Rich Geldreich for a bc7 encoder. ( see: https://github.com/richgel999/bc7enc16 ). This should help since the code is released under the same license as the rest of the STB libraries.

Also, I will post something under issue #203 since this really should belong as it's own library set.

raysan5 commented 6 years ago

@nothings sorry, just missed your comment!

What's the problem with current zlib license? I can just relicense or dual-license that code if required.

nothings commented 6 years ago

stb_image is public domain, so you'd have to disown copyright for your lib. I wouldn't bother, dds isn't complicated enough to need that much work anyway. The hard part will be defining a new API and hooking up the other stuff to it.

codedreality commented 6 years ago

Maybe this helps, someone based on stb_image and implemented dds support.

https://www.lonesock.net/soil.html

stephendb commented 5 years ago

This would be a nice addition, soil itself is very old, would be nice to move the dds support into stb_image.

jamesford42 commented 4 years ago

I need dds support and am probably going to rip it from soil. It is shown as having a public domain license. Any interest in me submitting a PR with this?

nothings commented 4 years ago

On reflection I think it's not worth integrating it into stb_image because the requirements are just too different. A texture loading library that wraps or requires stb_image is the right thing, really.

alexpanter commented 1 year ago

@nothings hi, old topic, but might one suggest a new header akin to stb_dds.h, which does "the thing" ?