When texture validation fails, log reason why using INFO_MSG
This commit is contained in:
parent
e3f61f3c78
commit
2669a9266f
12
GL/texture.c
12
GL/texture.c
@ -1419,14 +1419,14 @@ static bool _glTexImage2DValidate(GLenum target, GLint level, GLint internalForm
|
||||
if(format != GL_COLOR_INDEX4_EXT && format != GL_COLOR_INDEX4_TWID_KOS) {
|
||||
/* Abuse determineStride to see if type is valid */
|
||||
if(_determineStride(GL_RGBA, type) == -1) {
|
||||
INFO_MSG("");
|
||||
INFO_MSG("Unsupported type");
|
||||
_glKosThrowError(GL_INVALID_ENUM, __func__);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(_cleanInternalFormat(internalFormat) == -1) {
|
||||
INFO_MSG("");
|
||||
INFO_MSG("Unsupported internal format");
|
||||
_glKosThrowError(GL_INVALID_VALUE, __func__);
|
||||
return false;
|
||||
}
|
||||
@ -1436,7 +1436,7 @@ static bool _glTexImage2DValidate(GLenum target, GLint level, GLint internalForm
|
||||
if(level == 0){
|
||||
if((w < 8 || (w & -w) != w)) {
|
||||
/* Width is not a power of two. Must be!*/
|
||||
INFO_MSG("");
|
||||
INFO_MSG("Unsupported width");
|
||||
_glKosThrowError(GL_INVALID_VALUE, __func__);
|
||||
return false;
|
||||
}
|
||||
@ -1444,7 +1444,7 @@ static bool _glTexImage2DValidate(GLenum target, GLint level, GLint internalForm
|
||||
|
||||
if((h < 8 || (h & -h) != h)) {
|
||||
/* height is not a power of two. Must be!*/
|
||||
INFO_MSG("");
|
||||
INFO_MSG("Unsupported height");
|
||||
_glKosThrowError(GL_INVALID_VALUE, __func__);
|
||||
return false;
|
||||
}
|
||||
@ -1459,7 +1459,7 @@ static bool _glTexImage2DValidate(GLenum target, GLint level, GLint internalForm
|
||||
}
|
||||
|
||||
if(level < 0) {
|
||||
INFO_MSG("");
|
||||
INFO_MSG("Level must be >= 0");
|
||||
_glKosThrowError(GL_INVALID_VALUE, __func__);
|
||||
return false;
|
||||
}
|
||||
@ -1472,7 +1472,7 @@ static bool _glTexImage2DValidate(GLenum target, GLint level, GLint internalForm
|
||||
}
|
||||
|
||||
if(border) {
|
||||
INFO_MSG("");
|
||||
INFO_MSG("Border not allowed");
|
||||
_glKosThrowError(GL_INVALID_VALUE, __func__);
|
||||
return false;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user