#2
Posted 30 January 2013 - 01:32 PM
The game code of EDuke32 (eg. Duke3D and its CON compiler) is under the GPL. The engine code of EDuke32 (eg. BUILD + its renderers) is under BUILDLIC. The two are separate components that link together, but my understanding is that when 3DR released the Duke3D source code under the terms of the GPL there was an understanding that they allowed it to be linked against the BUILD engine, because.. well it would be useless otherwise.
Anyhow, what EDuke32 does is that it loads a texture from disk using a lossless format like PNG, generates mipmaps from it, compresses them to DXT and writes the compressed mipmaps level back to disk such that next time it loads the texture, it doesn't have to do any of that and can just upload all the compressed levels of the texture directly into GL. In essence it's exactly the same as if it was shipping its assets as DDS, which is pretty much what all modern games already do, but allows for more flexibility since you can modify the base stuff and have it replicate automagically to the "compiled" asset.
The core functionality it uses to achieve this is glGetCompressedTexImage(). It wouldn't have to do this if it used an offline DXT compiler like libsquish, but right now it relies on the OpenGL driver to perform the compression. The problem with this is that some drivers simply do not support compressing texture on-the-fly and only accept pre-compressed textures for implementation (AMD drivers) or intellectual property (open-source Linux drivers) reasons.
0