The DDS file format is commonly used to store precompressed texture images. This patch series implements a DDS file loader.
Up to now the image loaders unpack the image into RGBA8 format and let tr_image compute the required mipmaps for OpenGL. DDS images can store all the mipmaps of an image, so the LoadImage/CreateImage APIs had to be changed.
The fifth patch implements a DXT decompressor that allow using compressed images on hardware that doesn't support DXT formats, but this may be covered by patents, so maybe you want to skip that part.
The DDS file format can actually encode images in 100s of internal formats, with numerous vendor extensions etc., so there probably exist DDS files which this patch cannot load, I have tested the common DDS files with DXTn compression only.
Hmm. you're implementing a new CreateImage API .. I'm not adverse to these patches.
Like I said, I'd like to have the opinion of the other devs before applying this.
Created attachment 3091 [details] 0001-Change-type-of-image-data-to-color4ub_t.patch
Created attachment 3092 [details] 0002-New-R_CreateImage-API.patch
Created attachment 3093 [details] 0003-Support-uploading-pre-compressed-textures.patch
Created attachment 3094 [details] 0004-Add-an-DDS-file-parser.patch
Created attachment 3095 [details] 0005-Add-DXTn-decoder.patch