View Full Version : DXTC textures with DeviL (OpenIL)?
04-28-2003, 06:11 AM
Has anyone got precompressed .dds to work with DeviL?
I can load .dds textures normally but they are automatically uncompressed during loading and i'd like to take advantage of ARB_texture_compression and S3TC and load them precompressed. There is a hint for it to store precompressed DXTC data, but i have no idea how to access that. If i find that out i should also be able to skip the mipmap generation since they usually are all stored in the .dds along with the base texture.
Any hints, if you have tried this would be great?
04-28-2003, 06:36 AM
Write your own dds loader.
I recommend reading this document:- http://developer.nvidia.com/view.asp?IO=texture_compression_OpenGL
It's a straightforward process to read a dds file.
04-28-2003, 06:40 AM
you can access the data by ilGetDXTCData.
but as you load, the data gets decompressed anyway. so you loose time.
i ended up using nvidias nv_dds code for dds images. bc. i think devil was not build with something like dds in mind. other than that its a good lib.
04-28-2003, 07:00 AM
Thanks for you replys knackered and sanjo.
I thought about writing my own but i figured that i might just as well not since a lot of loaders already exists. I also wanted to keep to using DeviL. It shouldn't matter that it also decompresses since i'll be using the precompressed data just to load it into OpenGL, and then release the Devil texture, freeing the memory it used. Loading time isn't an issue at the moment, a bigger issue is getting it to work http://www.opengl.org/discussion_boards/ubb/smile.gif
I've noticed that ilGetDXTCData function but i'm not quite sure on how to know what size the image is including it's mipmaps (since it looks like the functions wants a pointer to a buffer and the size value i want to read). I think saw something about the space requirements somewhere in the ARB_texture_compression doc knackered mentioned (if the pixels use a fixed amount of space, it should be easy to calculate). I'll take a look at that now and see what i find.
I might take a look an nvidia's DDS loader if i can't get this to work though.
Thanks again guys!
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.