Handle cubemap face targets in GetSizedFormat

This commit is contained in:
baldurk
2014-12-11 22:49:34 +00:00
parent 5fe0354ce4
commit 3d99c14c9f
+13
View File
@@ -386,6 +386,19 @@ GLenum GetSizedFormat(const GLHookSet &gl, GLenum target, GLenum internalFormat)
default:
return internalFormat; // already explicitly sized
}
switch(target)
{
case eGL_TEXTURE_CUBE_MAP_POSITIVE_X:
case eGL_TEXTURE_CUBE_MAP_NEGATIVE_X:
case eGL_TEXTURE_CUBE_MAP_POSITIVE_Y:
case eGL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
case eGL_TEXTURE_CUBE_MAP_POSITIVE_Z:
case eGL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
target = eGL_TEXTURE_CUBE_MAP;
default:
break;
}
GLint red, depth;
gl.glGetInternalformativ(target, internalFormat, eGL_INTERNALFORMAT_RED_SIZE, sizeof(GLint), &red);