1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Do not attach depth buffer to frame buffer if same depth buffer already attached.

This commit is contained in:
Sergey Lipskiy 2017-02-03 21:28:06 +07:00
parent 9edd5a5f18
commit 210c9ea64a

View File

@ -771,6 +771,9 @@ void FrameBufferList::attachDepthBuffer()
glDiscardFramebufferEXT(GL_FRAMEBUFFER, 1, discards);
#endif
DepthBuffer * pDepthBuffer = depthBufferList().getCurrent();
if (m_pCurrent->m_pDepthBuffer == pDepthBuffer)
return;
if (m_pCurrent->m_FBO.isNotNull() && pDepthBuffer != nullptr) {
pDepthBuffer->initDepthImageTexture(m_pCurrent);
pDepthBuffer->initDepthBufferTexture(m_pCurrent);