improved error string
authorBrian Paul <brian.paul@tungstengraphics.com>
Tue, 3 Sep 2002 18:05:17 +0000 (18:05 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Tue, 3 Sep 2002 18:05:17 +0000 (18:05 +0000)
src/mesa/main/teximage.c
src/mesa/tnl/t_imm_api.c

index 95bed13d9d173374f7c666d34aed0e7e7d9e4fa8..e7df504fd74d45ab3e706698d7dc695013df0fca 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: teximage.c,v 1.111 2002/07/09 01:22:50 brianp Exp $ */
+/* $Id: teximage.c,v 1.112 2002/09/03 18:05:17 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -1212,7 +1212,8 @@ copytexsubimage_error_check( GLcontext *ctx, GLuint dimensions,
    teximage = _mesa_select_tex_image(ctx, texUnit, target, level);
    if (!teximage) {
       _mesa_error(ctx, GL_INVALID_OPERATION,
-                  "glCopyTexSubImage%dD(undefined texture)", dimensions);
+                  "glCopyTexSubImage%dD(undefined texture level: %d)",
+                  dimensions, level);
       return GL_TRUE;
    }
 
@@ -1537,6 +1538,8 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
    GET_CURRENT_CONTEXT(ctx);
    ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
 
+   internalFormat = GL_RGBA;
+
    if (is_color_format(internalFormat)) {
       _mesa_adjust_image_for_convolution(ctx, 2, &postConvWidth,
                                         &postConvHeight);
index 7631e0cbb848a1ffb2cf5eac59ae462a3cd0bdc5..f5a977b6002527809d9f044651e38829131564e6 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: t_imm_api.c,v 1.30 2002/06/16 01:09:16 brianp Exp $ */
+/* $Id: t_imm_api.c,v 1.31 2002/09/03 18:05:52 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -182,7 +182,7 @@ _tnl_Begin( GLenum mode )
    ASSERT (!ctx->CompileFlag);
 
    if (mode > GL_POLYGON) {
-      _mesa_error( ctx, GL_INVALID_ENUM, "_tnl_Begin" );
+      _mesa_error( ctx, GL_INVALID_ENUM, "_tnl_Begin(0x%x)", mode );
       return;
    }