fix depth-component test to allow rectangular textures
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 2 Jun 2006 12:46:53 +0000 (12:46 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 2 Jun 2006 12:46:53 +0000 (12:46 +0000)
src/mesa/main/teximage.c

index 02d2aa362cbcfaaa20c28b733e87b0b1edfa724b..0bc6716c240ade7ef36b565fe99f1ad5bcc759ec 100644 (file)
@@ -1461,11 +1461,13 @@ texture_error_check( GLcontext *ctx, GLenum target,
 
    /* additional checks for depth textures */
    if (_mesa_base_tex_format(ctx, internalFormat) == GL_DEPTH_COMPONENT) {
-      /* Only 1D and 2D textures supported */
+      /* Only 1D, 2D and rectangular textures supported, not 3D or cubes */
       if (target != GL_TEXTURE_1D &&
           target != GL_PROXY_TEXTURE_1D &&
           target != GL_TEXTURE_2D &&
-          target != GL_PROXY_TEXTURE_2D) {
+          target != GL_PROXY_TEXTURE_2D &&
+          target != GL_TEXTURE_RECTANGLE_ARB &&
+          target != GL_PROXY_TEXTURE_RECTANGLE_ARB) {
          if (!isProxy)
             _mesa_error(ctx, GL_INVALID_ENUM,
                         "glTexImage(target/internalFormat)");