aboutsummaryrefslogtreecommitdiffstats
path: root/code/renderer
diff options
context:
space:
mode:
authoricculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-06-13 02:28:51 +0000
committericculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2008-06-13 02:28:51 +0000
commit552953540cbb8065160c6670e8655b8d4279c286 (patch)
treec57a611f1f86b6f12e73b9dc52948e848edf945a /code/renderer
parenta4d1572fe38e3f4dfbdc1f0ee0b203da099a4717 (diff)
downloadioquake3-aero-552953540cbb8065160c6670e8655b8d4279c286.tar.gz
ioquake3-aero-552953540cbb8065160c6670e8655b8d4279c286.zip
Added GL_EXT_texture_compression_s3tc support.
GL_S3_s3tc, which Quake 3 previously supported, is legacy. This new codepath is the common, vendor-neutral extension to get the same results. git-svn-id: svn://svn.icculus.org/quake3/trunk@1387 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/renderer')
-rw-r--r--code/renderer/tr_image.c7
-rw-r--r--code/renderer/tr_types.h3
2 files changed, 8 insertions, 2 deletions
diff --git a/code/renderer/tr_image.c b/code/renderer/tr_image.c
index 737370f..c3828cd 100644
--- a/code/renderer/tr_image.c
+++ b/code/renderer/tr_image.c
@@ -182,6 +182,7 @@ void R_ImageList_f( void ) {
ri.Printf( PRINT_ALL, "RGB8" );
break;
case GL_RGB4_S3TC:
+ case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
ri.Printf( PRINT_ALL, "S3TC " );
break;
case GL_RGBA4:
@@ -602,7 +603,11 @@ static void Upload32( unsigned *data,
}
else
{
- if ( glConfig.textureCompression == TC_S3TC )
+ if ( glConfig.textureCompression == TC_S3TC_ARB )
+ {
+ internalFormat = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
+ }
+ else if ( glConfig.textureCompression == TC_S3TC )
{
internalFormat = GL_RGB4_S3TC;
}
diff --git a/code/renderer/tr_types.h b/code/renderer/tr_types.h
index 2a10342..50f9759 100644
--- a/code/renderer/tr_types.h
+++ b/code/renderer/tr_types.h
@@ -151,7 +151,8 @@ typedef enum {
*/
typedef enum {
TC_NONE,
- TC_S3TC
+ TC_S3TC, // this is for the GL_S3_s3tc extension.
+ TC_S3TC_ARB // this is for the GL_EXT_texture_compression_s3tc extension.
} textureCompression_t;
typedef enum {