I need to figure out how to convert images from png to dds formats in a thread that is separate from the rendering thread. We have found that it is much quicker to load the dds files than it is to load the png files. They are usually around 2048x1024 in size. The images are located on different web servers around the world so we cannot just convert them in photoshop and download the dds file directly.
Because of the size of the files, we cannot convert them within the drawing thread with the TextureIO stuff as this makes the animations choppy. I expect that I need to create a new GLContext in a separate thread (because TextureIO needs the context) and use that to read in the files, convert them and write them out as dds (DXT3). I am not sure how to create the context without displaying a GLCanvas. Once we have the file downloaded and converted, we do not need to download it again the next time the application is run because we will store it in our disk cache.
Any suggestions ( and sample code :)) for creating a second context in a separate thread in order to use the TextureIO stuff for converting the images would be greatly appreciated. Also if you have any other suggestions for converting the files (ie. a different library that does not need the GL Context) I would appreciate that too.
Thanks,
Jeff