diff options
author | Brian Paul <[email protected]> | 2002-10-18 13:24:08 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2002-10-18 13:24:08 +0000 |
commit | e71654961868eac559210ced359c1af114138d8a (patch) | |
tree | 6df9c1934f0042b39e9ab93aad5976e76a6bfbac /src/mesa | |
parent | 8c2a1f0e4d75515b460e6ee4c61a25fdefa97e8c (diff) |
only allow intformat==GL_COLOR_INDEX if EXT_paletted_texture is supported
Diffstat (limited to 'src/mesa')
-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 792fe352c35..e33a3986756 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -1,4 +1,4 @@ -/* $Id: teximage.c,v 1.120 2002/10/17 22:26:06 kschultz Exp $ */ +/* $Id: teximage.c,v 1.121 2002/10/18 13:24:08 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -212,7 +212,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: |