more work on GL_ARB_texture_cube_map
This commit is contained in:
@@ -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];
|
||||
|
Reference in New Issue
Block a user