GL: Fixed depth/stencil attachemnt logic.

This commit is contained in:
Branimir Karadžić 2015-08-04 08:40:14 -07:00
parent 8725acb200
commit d0b4657e15

View file

@ -1051,18 +1051,18 @@ namespace bgfx { namespace gl
if (isDepth(_format) )
{
const ImageBlockInfo& info = getBlockInfo(_format);
if (0 < info.stencilBits)
{
attachment = GL_DEPTH_STENCIL_ATTACHMENT;
}
else if (0 == info.depthBits)
if (0 == info.depthBits)
{
attachment = GL_STENCIL_ATTACHMENT;
}
else
else if (0 == info.stencilBits)
{
attachment = GL_DEPTH_ATTACHMENT;
}
else
{
attachment = GL_DEPTH_STENCIL_ATTACHMENT;
}
}
else
{