GL: be more careful with framebuffer mappings. might fix issues.

This commit is contained in:
Arisotura 2020-08-20 01:19:09 +02:00
parent 660792d64b
commit 959e7f568d
2 changed files with 5 additions and 3 deletions

View File

@ -1159,8 +1159,9 @@ void RenderFrame()
{ {
CurShaderID = -1; CurShaderID = -1;
if (Antialias) glBindFramebuffer(GL_FRAMEBUFFER, FramebufferID[2]); glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
else glBindFramebuffer(GL_FRAMEBUFFER, FramebufferID[FrontBuffer]); if (Antialias) glBindFramebuffer(GL_DRAW_FRAMEBUFFER, FramebufferID[2]);
else glBindFramebuffer(GL_DRAW_FRAMEBUFFER, FramebufferID[FrontBuffer]);
ShaderConfig.uScreenSize[0] = ScreenW; ShaderConfig.uScreenSize[0] = ScreenW;
ShaderConfig.uScreenSize[1] = ScreenH; ShaderConfig.uScreenSize[1] = ScreenH;

View File

@ -162,7 +162,8 @@ void SetRenderSettings(RenderSettings& settings)
void RenderFrame() void RenderFrame()
{ {
glBindFramebuffer(GL_FRAMEBUFFER, CompScreenOutputFB); glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, CompScreenOutputFB);
glDisable(GL_DEPTH_TEST); glDisable(GL_DEPTH_TEST);
glDisable(GL_STENCIL_TEST); glDisable(GL_STENCIL_TEST);