1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Fix crash in DepthBufferList::clearBuffer()

This commit is contained in:
Sergey Lipskiy 2014-11-04 17:02:48 +06:00
parent e79b136a8d
commit f80b17bf15

View File

@ -168,7 +168,10 @@ void DepthBufferList::clearBuffer()
float color[4] = {1.0f, 1.0f, 0.0f, 1.0f};
glBindImageTexture(depthImageUnit, 0, 0, GL_FALSE, 0, GL_READ_WRITE, GL_RGBA32F);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_pCurrent->m_FBO);
const u32 cycleType = gDP.otherMode.cycleType;
gDP.otherMode.cycleType == G_CYC_FILL;
video().getRender().drawRect(0,0,VI.width, VI.height, color);
gDP.otherMode.cycleType = cycleType;
glBindImageTexture(depthImageUnit, m_pCurrent->m_pDepthTexture->glName, 0, GL_FALSE, 0, GL_READ_WRITE, GL_RGBA32F);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, frameBufferList().getCurrent()->m_FBO);
#endif // GL_IMAGE_TEXTURES_SUPPORT