more work on GL_ARB_texture_cube_map

This commit is contained in:
Brian Paul
2000-05-30 00:27:24 +00:00
parent eed6f69199
commit ad817704fa
2 changed files with 84 additions and 20 deletions

View File

@@ -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];