Skip to content

Commit

Permalink
Made so that post processing doesn't affect UI and overlays.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinnegatamante committed Jul 26, 2020
1 parent 445a91a commit 1e9a554
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
18 changes: 14 additions & 4 deletions Source/SysVita/Graphics/GraphicsContextVita.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,14 @@ void IGraphicsContext::EndFrame()
glViewport(0, 0, SCR_WIDTH, SCR_HEIGHT);
glScissor( 0, 0, SCR_WIDTH, SCR_HEIGHT);
if (gamma_val != 1.0f) gRenderer->DoGamma(gamma_val);
if (gOverlay) {
glBindTexture(GL_TEXTURE_2D, cur_overlay);
gRenderer->DrawUITexture();
if (!gPostProcessing) {
if (gOverlay) {
glBindTexture(GL_TEXTURE_2D, cur_overlay);
gRenderer->DrawUITexture();
}
DrawInGameMenu();
}
DrawInGameMenu();
if (!pause_emu) vglStopRenderingInit();
if (gWaitRendering) glFinish();
DrawPendingDialog();
}
Expand All @@ -212,6 +215,13 @@ void IGraphicsContext::UpdateFrame(bool wait_for_vbl)
vglVertexAttribPointerMapped(0, vflux_vertices);
vglVertexAttribPointerMapped(1, vflux_texcoords);
vglDrawObjects(GL_TRIANGLE_FAN, 4, true);
glUseProgram(0);
glEnableClientState(GL_VERTEX_ARRAY);
if (gOverlay) {
glBindTexture(GL_TEXTURE_2D, cur_overlay);
gRenderer->DrawUITexture();
}
DrawInGameMenu();
vglStopRendering();
}
}
Expand Down
1 change: 0 additions & 1 deletion Source/SysVita/UI/InGameMenuScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,4 @@ void DrawInGameMenu() {
EnableMenuButtons(pause_emu);
}
oldpad = pad.buttons;
if (!pause_emu) vglStopRenderingInit();
}

0 comments on commit 1e9a554

Please sign in to comment.