summaryrefslogtreecommitdiff
path: root/src/mesa/main/texformat.c
diff options
context:
space:
mode:
authorDaniel Borca <dborca@users.sourceforge.net>2003-11-21 09:56:50 +0000
committerDaniel Borca <dborca@users.sourceforge.net>2003-11-21 09:56:50 +0000
commit663a9e1b7ef7b8384abe2f81e1a8749b942f6d3a (patch)
treeb106ee1b0d50acc49060d11e3b5a578f22df1575 /src/mesa/main/texformat.c
parent8b07e9d8a4342ec2a24fec37932398189ef80eb5 (diff)
more texture compression
Diffstat (limited to 'src/mesa/main/texformat.c')
-rw-r--r--src/mesa/main/texformat.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 0000767f4c..7af0b1cdf4 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -874,7 +874,7 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
_mesa_problem(ctx, "texture compression extension not enabled");
if (ctx->Extensions.TDFX_texture_compression_FXT1)
return &_mesa_texformat_rgb_fxt1;
- else if (ctx->Extensions.EXT_texture_compression_s3tc)
+ else if (ctx->Extensions.EXT_texture_compression_s3tc || ctx->Extensions.S3_s3tc)
return &_mesa_texformat_rgb_dxt1;
return &_mesa_texformat_rgb;
case GL_COMPRESSED_RGBA_ARB:
@@ -882,7 +882,7 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
_mesa_problem(ctx, "texture compression extension not enabled");
if (ctx->Extensions.TDFX_texture_compression_FXT1)
return &_mesa_texformat_rgba_fxt1;
- else if (ctx->Extensions.EXT_texture_compression_s3tc)
+ else if (ctx->Extensions.EXT_texture_compression_s3tc || ctx->Extensions.S3_s3tc)
return &_mesa_texformat_rgba_dxt3; /* Not rgba_dxt1! See the spec */
return &_mesa_texformat_rgba;
@@ -927,6 +927,20 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
else
return NULL;
+ /* GL_S3_s3tc */
+ case GL_RGB_S3TC:
+ case GL_RGB4_S3TC:
+ if (ctx->Extensions.S3_s3tc)
+ return &_mesa_texformat_rgb_dxt1;
+ else
+ return NULL;
+ case GL_RGBA_S3TC:
+ case GL_RGBA4_S3TC:
+ if (ctx->Extensions.S3_s3tc)
+ return &_mesa_texformat_rgba_dxt3;
+ else
+ return NULL;
+
default:
_mesa_problem(ctx, "unexpected format in _mesa_choose_tex_format()");
return NULL;