summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-06-02 12:44:36 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-06-02 12:44:36 +0000
commit17c33d6f04d7926ba816f93a7b4be6ffc1e3f3a2 (patch)
treef9490d056f44db9eb6e627d2754eaa940c2f36bb
parent5ab599600ee659b9831b26216196693d59798810 (diff)
fix depth-component test to allow rectangular textures
-rw-r--r--src/mesa/main/teximage.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index ff1d51d7d0..b1aef54718 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1448,11 +1448,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)");