Whats your preferred DDS reader?

Started by
3 comments, last by B_old 10 years, 5 months ago

Since doing more Linux/OpenGL stuff I have been wondering what people are using to load DDS files. Freeimage for instance decompresses the data automatically, which is not what I want in this case. I then tried GLI but unfortunately it fails read mipmaps, at least for files generated with the DDS plugin for Gimp and seems to have even more trouble with DXT5 compressed files.

Is there some library that is more robust? Are people generally implementing their own readers? Or compressing textures on the fly?

Maybe I should take a look at Devil although it is no longer maintained. Can you recommend it?

Advertisement

You can quite easily implement your own; it's not a difficult format to work with. See e.g. here for one example.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

My preferred DDS library tool is PVRTexTool, which lets me convert it to KTX format. laugh.png

KTX has the advantage that it's unambiguously documented (though, you probably couldn't care less since there's a ready-to-use loader library!) and that it loads into something you can directly feed to OpenGL. All the constants and such are already correct as OpenGL expects them, no need to do any obscure translations from some DirectX constants (which sometimes change meaning with a different version) to some other OpenGL constants. Just give OpenGL what's in the file. To me, that is a big, big plus.

SOIL. Simplicity is hard to beat.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

SOIL. Simplicity is hard to beat.

Good library.
If you need Python port, see pysoil.

I gave GLI another try and have to admit, that the mipmap problem was entirely my mistake. I was able to solve the problem with BC5 encoded files saved from gimp and it seems to be fixed in the next version. All in all I'm quite content with the library now.

This topic is closed to new replies.

Advertisement