summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-06-02 12:46:53 +0000
committerBrian Paul <[email protected]>2006-06-02 12:46:53 +0000
commit2b04dd9d2cba6ec3506e78016e64cffce6e8abf7 (patch)
tree973470a1c5fa86f6ba303ec8c4888b19d6d60f8c /src/mesa/main/teximage.c
parentb302419abe96cdb81878913c164d7ae2209ddcda (diff)
fix depth-component test to allow rectangular textures
Diffstat (limited to 'src/mesa/main/teximage.c')
-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 02d2aa362cb..0bc6716c240 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -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)");