fixed GL_INTENSITY error checking bug

This commit is contained in:
Brian Paul 2000-06-27 15:47:59 +00:00
parent 498c09040e
commit 2a1f50aee4
2 changed files with 7 additions and 4 deletions

View file

@ -1,4 +1,4 @@
/* $Id: colortab.c,v 1.18 2000/05/24 14:03:04 brianp Exp $ */
/* $Id: colortab.c,v 1.19 2000/06/27 15:47:59 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -301,7 +301,8 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
assert(table);
if (!_mesa_is_legal_format_and_type(format, type)) {
if (!_mesa_is_legal_format_and_type(format, type) ||
format == GL_INTENSITY) {
gl_error(ctx, GL_INVALID_ENUM, "glColorTable(format or type)");
return;
}
@ -477,7 +478,8 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
assert(table);
if (!_mesa_is_legal_format_and_type(format, type)) {
if (!_mesa_is_legal_format_and_type(format, type) ||
format == GL_INTENSITY) {
gl_error(ctx, GL_INVALID_ENUM, "glColorSubTable(format or type)");
return;
}

View file

@ -1,4 +1,4 @@
/* $Id: image.c,v 1.33 2000/06/22 21:26:51 brianp Exp $ */
/* $Id: image.c,v 1.34 2000/06/27 15:47:59 brianp Exp $ */
/*
* Mesa 3-D graphics library
@ -330,6 +330,7 @@ _mesa_is_legal_format_and_type( GLenum format, GLenum type )
case GL_GREEN:
case GL_BLUE:
case GL_ALPHA:
case GL_INTENSITY:
case GL_LUMINANCE:
case GL_LUMINANCE_ALPHA:
case GL_DEPTH_COMPONENT: