Call draw->Begin/EndFrame from outside the screen manager.

Just a very small refactoring that I want in a separate commit.
This commit is contained in:
Henrik Rydgård committed 2023-08-09 23:24:28 +02:00
1 parent 50ea506b6a
commit 0d4a2a7594
3 files changed
+6 -11

No files matched your search

+5
View File
@@ -1135,12 +1135,17 @@ void NativeFrame(GraphicsContext *graphicsContext) {
debugFlags |= Draw::DebugFlags::PROFILE_SCOPES;
g_screenManager->getDrawContext()->SetDebugFlags(debugFlags);
g_draw->BeginFrame();
// All actual rendering happen in here.
g_screenManager->render();
if (g_screenManager->getUIContext()->Text()) {
g_screenManager->getUIContext()->Text()->OncePerFrame();
}
// This triggers present.
g_draw->EndFrame();
if (resized) {
INFO_LOG(G3D, "Resized flag set - recalculating bounds");
resized = false;