GetSizedFormat should handle GL_STENCIL_INDEX as well. Refs #165

* Maybe GL_STENCIL isn't even ever valid, I have no idea.
This commit is contained in:
baldurk
2015-10-26 10:51:26 +01:00
parent dda2160225
commit 0199a6c36b
+3
View File
@@ -465,6 +465,7 @@ GLenum GetSizedFormat(const GLHookSet &gl, GLenum target, GLenum internalFormat)
case eGL_RGBA:
case eGL_DEPTH_COMPONENT:
case eGL_STENCIL:
case eGL_STENCIL_INDEX:
case eGL_DEPTH_STENCIL:
break;
default:
@@ -496,6 +497,7 @@ GLenum GetSizedFormat(const GLHookSet &gl, GLenum target, GLenum internalFormat)
// without the query function, just default to sensible defaults
red = 8;
depth = 32;
stencil = 8;
}
switch(internalFormat)
@@ -529,6 +531,7 @@ GLenum GetSizedFormat(const GLHookSet &gl, GLenum target, GLenum internalFormat)
else
return eGL_RGBA8;
case eGL_STENCIL:
case eGL_STENCIL_INDEX:
if(stencil == 16)
return eGL_STENCIL_INDEX16;
else