diff options
author | Brian Paul <[email protected]> | 2001-05-21 16:41:03 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2001-05-21 16:41:03 +0000 |
commit | 3893e638e6521b9c070e01c0b31d22754ff97a88 (patch) | |
tree | f92282e8466199dd45c72e6725c3fa0263bae2e0 /src/mesa/main/hint.c | |
parent | e7e38a47a8dd567fd5a848cbef09b14018fb2fe0 (diff) |
initial support for GL_SGIS_generate_mipmap extension
Diffstat (limited to 'src/mesa/main/hint.c')
-rw-r--r-- | src/mesa/main/hint.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/mesa/main/hint.c b/src/mesa/main/hint.c index ce0b27394fa..e37cfb1a87d 100644 --- a/src/mesa/main/hint.c +++ b/src/mesa/main/hint.c @@ -1,4 +1,4 @@ -/* $Id: hint.c,v 1.9 2001/03/12 00:48:38 gareth Exp $ */ +/* $Id: hint.c,v 1.10 2001/05/21 16:41:03 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -99,9 +99,9 @@ _mesa_try_Hint( GLcontext *ctx, GLenum target, GLenum mode ) /* GL_ARB_texture_compression */ case GL_TEXTURE_COMPRESSION_HINT_ARB: - if (ctx->Extensions.ARB_texture_compression) { + if (!ctx->Extensions.ARB_texture_compression) { _mesa_error(ctx, GL_INVALID_ENUM, "glHint(target)"); - return GL_TRUE; + return GL_FALSE; } if (ctx->Hint.TextureCompression == mode) return GL_TRUE; @@ -109,6 +109,18 @@ _mesa_try_Hint( GLcontext *ctx, GLenum target, GLenum mode ) ctx->Hint.TextureCompression = mode; break; + /* GL_SGIS_generate_mipmap */ + case GL_GENERATE_MIPMAP_HINT_SGIS: + if (!ctx->Extensions.SGIS_generate_mipmap) { + _mesa_error(ctx, GL_INVALID_ENUM, "glHint(target)"); + return GL_FALSE; + } + if (ctx->Hint.GenerateMipmap == mode) + return GL_TRUE; + FLUSH_VERTICES(ctx, _NEW_HINT); + ctx->Hint.GenerateMipmap = mode; + break; + default: _mesa_error(ctx, GL_INVALID_ENUM, "glHint(target)"); return GL_FALSE; |