mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Fix crash in _copyDepthBuffer()
This commit is contained in:
parent
06da08e349
commit
7365301a8d
4
gSP.cpp
4
gSP.cpp
|
@ -2113,8 +2113,12 @@ void _copyDepthBuffer()
|
|||
depthBufferList().saveBuffer(gDP.colorImage.address);
|
||||
// Take any frame buffer and attach source depth buffer to it, to blit it into copy depth buffer
|
||||
FrameBuffer * pTmpBuffer = frameBufferList().findTmpBuffer(frameBufferList().getCurrent()->m_startAddress);
|
||||
if (pTmpBuffer == NULL)
|
||||
return;
|
||||
DepthBuffer * pTmpBufferDepth = pTmpBuffer->m_pDepthBuffer;
|
||||
pTmpBuffer->m_pDepthBuffer = depthBufferList().findBuffer(gSP.bgImage.address);
|
||||
if (pTmpBufferDepth == NULL || pTmpBuffer->m_pDepthBuffer == NULL)
|
||||
return;
|
||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, pTmpBuffer->m_FBO);
|
||||
pTmpBuffer->m_pDepthBuffer->setDepthAttachment();
|
||||
GLuint attachment = GL_COLOR_ATTACHMENT0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user