mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
ogl: reset api state for blitting
glBlitFramebuffer depends on scissior test and color mask. It isn't documented well, but it does. So we have to reset the apistate before using it. In this way, there isn't any benefit of glBlitFramebuffer, glDrawArray would be better :-(
This commit is contained in:
parent
15df7b3445
commit
93f9f23576
2 changed files with 12 additions and 0 deletions
|
@ -435,6 +435,8 @@ void XFBSource::DecodeToTexture(u32 xfbAddr, u32 fbWidth, u32 fbHeight)
|
|||
|
||||
void XFBSource::CopyEFB(float Gamma)
|
||||
{
|
||||
g_renderer->ResetAPIState();
|
||||
|
||||
// Copy EFB data to XFB and restore render target again
|
||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, FramebufferManager::GetEFBFramebuffer());
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, FramebufferManager::GetXFBFramebuffer());
|
||||
|
@ -451,6 +453,8 @@ void XFBSource::CopyEFB(float Gamma)
|
|||
|
||||
// Return to EFB.
|
||||
FramebufferManager::SetFramebuffer(0);
|
||||
|
||||
g_renderer->RestoreAPIState();
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue