don't set GL_TEXTURE_MAX_LEVEL for GL_TEXTURE_RECTANGLE_ARB as that generates an...
authorBrian <brian@yutani.localnet.net>
Tue, 17 Apr 2007 14:29:37 +0000 (08:29 -0600)
committerBrian <brian@yutani.localnet.net>
Tue, 17 Apr 2007 14:29:37 +0000 (08:29 -0600)
src/mesa/main/attrib.c

index 0df8d230500e9613daaf3795d8eaefc3cc538b5f..e2cfb8a1f6699c6e6d78d828bf7e855615854feb 100644 (file)
@@ -765,7 +765,8 @@ pop_texture_group(GLcontext *ctx, const struct gl_texture_attrib *texAttrib)
          _mesa_TexParameterf(target, GL_TEXTURE_MIN_LOD, obj->MinLod);
          _mesa_TexParameterf(target, GL_TEXTURE_MAX_LOD, obj->MaxLod);
          _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, obj->BaseLevel);
-         _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, obj->MaxLevel);
+         if (target != GL_TEXTURE_RECTANGLE_ARB)
+            _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, obj->MaxLevel);
          if (ctx->Extensions.EXT_texture_filter_anisotropic) {
             _mesa_TexParameterf(target, GL_TEXTURE_MAX_ANISOTROPY_EXT,
                                 obj->MaxAnisotropy);