From 663a9e1b7ef7b8384abe2f81e1a8749b942f6d3a Mon Sep 17 00:00:00 2001 From: Daniel Borca Date: Fri, 21 Nov 2003 09:56:50 +0000 Subject: more texture compression --- src/mesa/main/texformat.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/mesa/main/texformat.c') 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; -- cgit v1.2.3