Bug 5442 - DDS format image loader
Status: NEW
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Video
Version: GIT MASTER
Hardware: All All
: P4 enhancement
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2012-03-15 10:38 EDT by gimhael
Modified: 2012-07-01 13:12:32 EDT
1 user (show)

See Also:


Attachments
0001-Change-type-of-image-data-to-color4ub_t.patch (18.48 KB, patch)
2012-03-15 10:39 EDT, gimhael
0002-New-R_CreateImage-API.patch (21.99 KB, patch)
2012-03-15 10:40 EDT, gimhael
0003-Support-uploading-pre-compressed-textures.patch (3.56 KB, patch)
2012-03-15 10:40 EDT, gimhael
0004-Add-an-DDS-file-parser.patch (25.99 KB, patch)
2012-03-15 10:41 EDT, gimhael
0005-Add-DXTn-decoder.patch (9.18 KB, patch)
2012-03-15 10:41 EDT, gimhael

Description gimhael 2012-03-15 10:38:46 EDT
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.
Comment 1 gimhael 2012-03-15 10:39:42 EDT
Created attachment 3091 [details]
0001-Change-type-of-image-data-to-color4ub_t.patch
Comment 2 gimhael 2012-03-15 10:40:10 EDT
Created attachment 3092 [details]
0002-New-R_CreateImage-API.patch
Comment 3 gimhael 2012-03-15 10:40:34 EDT
Created attachment 3093 [details]
0003-Support-uploading-pre-compressed-textures.patch
Comment 4 gimhael 2012-03-15 10:41:01 EDT
Created attachment 3094 [details]
0004-Add-an-DDS-file-parser.patch
Comment 5 gimhael 2012-03-15 10:41:25 EDT
Created attachment 3095 [details]
0005-Add-DXTn-decoder.patch
Comment 6 Thilo Schulz 2012-07-01 13:12:32 EDT
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.