diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2001-02-26 18:24:55 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2001-02-26 18:24:55 +0000 |
commit | 1f57563b9dccfb6ce5026eaf5b7a418dc4dd52b9 (patch) | |
tree | 12d2a7d46e32ed590843ff5d1d5120b679110723 | |
parent | 30038ecaa23a5acb1a532dd32f22a02b910fc17c (diff) |
added a cube map error check
-rw-r--r-- | src/mesa/main/teximage.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 279126f2d4..7eb8d9352b 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -1,4 +1,4 @@ -/* $Id: teximage.c,v 1.78 2001/02/19 20:01:41 brianp Exp $ */ +/* $Id: teximage.c,v 1.79 2001/02/26 18:24:55 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -733,6 +733,15 @@ texture_error_check( GLcontext *ctx, GLenum target, return GL_TRUE; } + /* For cube map, width must equal height */ + if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && + target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) { + if (width != height) { + gl_error(ctx, GL_INVALID_VALUE, "glTexImage2D(width != height)"); + return GL_TRUE; + } + } + iformat = _mesa_base_tex_format( ctx, internalFormat ); if (iformat < 0) { if (!isProxy) { |