mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-18 21:13:02 +01:00
GL: Fixed depth/stencil attachemnt logic.
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user