mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Do not attach depth buffer to frame buffer if same depth buffer already attached.
This commit is contained in:
parent
9edd5a5f18
commit
210c9ea64a
|
@ -771,6 +771,9 @@ void FrameBufferList::attachDepthBuffer()
|
||||||
glDiscardFramebufferEXT(GL_FRAMEBUFFER, 1, discards);
|
glDiscardFramebufferEXT(GL_FRAMEBUFFER, 1, discards);
|
||||||
#endif
|
#endif
|
||||||
DepthBuffer * pDepthBuffer = depthBufferList().getCurrent();
|
DepthBuffer * pDepthBuffer = depthBufferList().getCurrent();
|
||||||
|
if (m_pCurrent->m_pDepthBuffer == pDepthBuffer)
|
||||||
|
return;
|
||||||
|
|
||||||
if (m_pCurrent->m_FBO.isNotNull() && pDepthBuffer != nullptr) {
|
if (m_pCurrent->m_FBO.isNotNull() && pDepthBuffer != nullptr) {
|
||||||
pDepthBuffer->initDepthImageTexture(m_pCurrent);
|
pDepthBuffer->initDepthImageTexture(m_pCurrent);
|
||||||
pDepthBuffer->initDepthBufferTexture(m_pCurrent);
|
pDepthBuffer->initDepthBufferTexture(m_pCurrent);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user