mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2025-03-14 00:49:53 -04:00
Fixed MSAA resolve.
This commit is contained in:
parent
9852b6977c
commit
673a80363c
1 changed files with 5 additions and 2 deletions
|
@ -2202,11 +2202,11 @@ namespace bgfx
|
|||
{
|
||||
// When only depth is attached disable draw buffer to avoid
|
||||
// GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER.
|
||||
glDrawBuffer(GL_NONE);
|
||||
GL_CHECK(glDrawBuffer(GL_NONE) );
|
||||
}
|
||||
|
||||
// Disable read buffer to avoid GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER.
|
||||
glReadBuffer(GL_NONE);
|
||||
GL_CHECK(glReadBuffer(GL_NONE) );
|
||||
}
|
||||
|
||||
BX_CHECK(GL_FRAMEBUFFER_COMPLETE == glCheckFramebufferStatus(GL_FRAMEBUFFER)
|
||||
|
@ -2267,6 +2267,7 @@ namespace bgfx
|
|||
if (0 != m_fbo[1])
|
||||
{
|
||||
GL_CHECK(glBindFramebuffer(GL_READ_FRAMEBUFFER, m_fbo[0]) );
|
||||
GL_CHECK(glReadBuffer(GL_COLOR_ATTACHMENT0) );
|
||||
GL_CHECK(glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_fbo[1]) );
|
||||
GL_CHECK(glBlitFramebuffer(0
|
||||
, 0
|
||||
|
@ -2279,6 +2280,8 @@ namespace bgfx
|
|||
, GL_COLOR_BUFFER_BIT
|
||||
, GL_LINEAR
|
||||
) );
|
||||
GL_CHECK(glBindFramebuffer(GL_READ_FRAMEBUFFER, m_fbo[0]) );
|
||||
GL_CHECK(glReadBuffer(GL_NONE) );
|
||||
GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, s_renderCtx->m_msaaBackBufferFbo) );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue