Jump to content
  • Advertisement
Sign in to follow this  
godmodder

Portable integration of DDS data into binary file format

This topic is 2901 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,

I'm working on a level editor and I want to store the textures in the level files it produces.In particular, I'd like to store the textures as compressed DDS files integrated in my own portable binary file format. Currently I use the Qt library (QDataStream) to achieve the reading/writing of binary files in a portable manner.
I found that the DevIL image library supports the loading and saving of DDS files, but I can't figure out whether it loads/saves the data in a portable format that I can just merge with my current files.
Does anyone here know if this is the case?

Maybe I'm overlooking something and perhaps there might be a better way of doing this. Please tell me about it if that's the case.

Thanks for the help,
Jeroen

Share this post


Link to post
Share on other sites
Advertisement
I'm pretty sure DevIL can work with streams of bytes, in which case you can pass those byte-streams to your file-writer.

Share this post


Link to post
Share on other sites
Yes, but does DevIL load/save the dds files in a platform-independent way?

I want to:
1) write a dds file with DevIL and integrate it into my own binary file format
2) extract the dds file while loading my format
3) let DevIL load the extracted dds file back

But does DevIL take endianness, etc... into account while loading/saving?
If not, I think I have to write the data of the dds files myself with the QDataStream to make it portable.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!