Page 1 of 1

Unable to load DDS files under Linux.

Posted: Thu Jun 10, 2010 3:18 pm
by neon9999

I need to load (and also save, eventually, but for now I just want to load) DDS files (DXT5 in fact). I'm developing this application in order to work under Linux and Windows, both in 32 and 64 bit.

I have already separated all binary libs for each architecture/OS, all downloaded from the GFL SDK download page, and they all share the same include directory. Everything compiles fine, the application works well, until I load a DDS/DXT5 file under linux. Under win64 it works as expected, but when I call gflLoadBitmap() under linux, it returns an error ("unable to load file" or similar, I can't check right now). I checked if dds is supported (checking all available formats using gflGetFormatNameByIndex() with gflGetNumberOfFormat()), and it turns out DDS is supported under Windows but not Linux, despite what the available formats page says (it doesn't say it's Windows only).

What's wrong then? Is DDS actually not supported under Linux? Maybe the files available to download aren't currently correct?

Otherwise, in order to share some code, I can try to create a very simple application that works under Windows but not Linux, since my application is very big.

Thanks for any help!

Re: Unable to load DDS files under Linux.

Posted: Thu Jun 10, 2010 3:43 pm
by xnview
Could you send me a sample that you try to load?

Re: Unable to load DDS files under Linux.

Posted: Fri Jun 11, 2010 11:15 am
by neon9999

I solved the problem by myself.

There were two issues: first, I was reading the filenames from a file that was saved with windows line endings, and I was reading the filenames wrong, which caused it not to read the files correctly.

Additionally, I was statically linking to one version of GFL and then dynamically linking to a different version, so under windows it said it supported DDS but not under linux.

I've fixed both problems and now images seem to load correctly.

Sorry for the trouble! :)