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

Fixes menu on Castlevania and Rayman 2 with FBE enabled on Raspberry Pi

Probably fixes other FBE issues as well
This commit is contained in:
Logan McNaughton 2016-07-09 13:07:03 -06:00 committed by Sergey Lipskiy
parent 1d56091c59
commit a20dc97a5a

View File

@ -160,10 +160,6 @@ void FrameBuffer::init(u32 _address, u32 _endAddress, u16 _format, u16 _size, u1
m_fingerprint = false;
_initTexture(_width, _height, _format, _size, m_pTexture);
#ifdef VC
const GLenum discards[] = {GL_DEPTH_ATTACHMENT};
glDiscardFramebufferEXT(GL_FRAMEBUFFER, 1, discards);
#endif
glBindFramebuffer(GL_FRAMEBUFFER, m_FBO);
#ifdef GL_MULTISAMPLING_SUPPORT
@ -715,10 +711,6 @@ void FrameBufferList::attachDepthBuffer()
{
if (m_pCurrent == nullptr)
return;
#ifdef VC
const GLenum discards[] = {GL_DEPTH_ATTACHMENT};
glDiscardFramebufferEXT(GL_FRAMEBUFFER, 1, discards);
#endif
DepthBuffer * pDepthBuffer = depthBufferList().getCurrent();
if (m_pCurrent->m_FBO > 0 && pDepthBuffer != nullptr) {
@ -921,8 +913,13 @@ void FrameBufferList::renderBuffer(u32 _address)
}
glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
if (m_pCurrent != nullptr)
if (m_pCurrent != nullptr) {
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_pCurrent->m_FBO);
#ifdef VC
const GLenum discards[] = {GL_DEPTH_ATTACHMENT};
glDiscardFramebufferEXT(GL_FRAMEBUFFER, 1, discards);
#endif
}
ogl.swapBuffers();
gDP.changed |= CHANGED_SCISSOR;
}