mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2025-02-17 20:31:57 -05:00
GL: Fixed depth/stencil attachemnt logic.
This commit is contained in:
parent
8725acb200
commit
d0b4657e15
1 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue