diff options
author | Brian Paul <[email protected]> | 2000-05-30 00:27:24 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2000-05-30 00:27:24 +0000 |
commit | ad817704fa2c6d8449f55565f07ab5592a574fb6 (patch) | |
tree | 2699c808dc59b8e7335cad2c19cbf38a96826bd2 /src/mesa/main/teximage.c | |
parent | eed6f691991ed0d64752fa712c83f67eb700b9ad (diff) |
more work on GL_ARB_texture_cube_map
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r-- | src/mesa/main/teximage.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index af5bd3781b0..d94b65fb3a7 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -957,6 +957,17 @@ texture_error_check( GLcontext *ctx, GLenum target, } } + /* 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) { + if (!isProxy) { + gl_error(ctx, GL_INVALID_VALUE, "glTexImage2D(width != height)"); + } + return GL_TRUE; + } + } + /* Depth */ if (dimensions >= 3) { if (depth < 2 * border || depth > 2 + ctx->Const.MaxTextureSize @@ -1186,6 +1197,15 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions, } } + /* 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, "glCopyTexImage2D(width != height)"); + return GL_TRUE; + } + } + /* Level */ if (level<0 || level>=ctx->Const.MaxTextureLevels) { char message[100]; |