diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2002-10-18 13:24:28 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2002-10-18 13:24:28 +0000 |
commit | 7e158215a9116465ac4de52789121955c0597b30 (patch) | |
tree | 5f3ce1eb455c9359d17026659c6c32f6c915600b | |
parent | 014fcdf7d4fccec482adde2ccfdd54f08738469e (diff) |
only allow intformat==GL_COLOR_INDEX if EXT_paletted_texture is supported
-rw-r--r-- | src/mesa/main/teximage.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 871df601e9..c18b52b71f 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -1,4 +1,4 @@ -/* $Id: teximage.c,v 1.104.2.14 2002/10/10 14:11:33 brianp Exp $ */ +/* $Id: teximage.c,v 1.104.2.15 2002/10/18 13:24:28 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -215,7 +215,10 @@ _mesa_base_tex_format( GLcontext *ctx, GLint format ) case GL_COLOR_INDEX8_EXT: case GL_COLOR_INDEX12_EXT: case GL_COLOR_INDEX16_EXT: - return GL_COLOR_INDEX; + if (ctx->Extensions.EXT_paletted_texture) + return GL_COLOR_INDEX; + else + return -1; case GL_DEPTH_COMPONENT: case GL_DEPTH_COMPONENT16_SGIX: case GL_DEPTH_COMPONENT24_SGIX: |