-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move Window and Gui calls to port game loop #787
Conversation
a2bdcac
to
ce69dc6
Compare
I haven't removed My thinking is there are three options:
I think option 3 is the most ideal, but making a public method means that all future Window variants would inherit the same function syntax of Therefore option 2 is probably more flexible. Online suggest lambda passed via Granted we don't know yet what other Window/renderers would look like today, so if anything we can always just change things up when that day happens. |
… logic as a LUS default
ce69dc6
to
d8d235c
Compare
This has been updated to go with option 3 outlined above, but instead of making the draw method a virtual on the base Window class, instead a dedicated method for The SoH PR has been updated accordingly. This means LUS provides a sensible default draw call that ports can use with out having to worry about logic, but the underlying methods are all public in case a port wants to override the draw process. |
After some of the previous GUI/Window refactors, certain actions where no longer happening in the order that they originally were, leading to some issues happening like:
To address this, I've pulled out some of the GUI/Window handling out of Fast3D itself (gfx_pc) and created public calls that ports can call instead in the correct order to resolved the issues listed above.
Dropped frame support is pulled out of
gfx_run()
into a dedicated methodWindow::IsFrameReady()
which ports can now use to bail out of all rendering.Gui::Draw()
was split into two methodsGui::StartDraw()
andGui::EndDraw()
so thatgfx_run()
can be called by ports in-between the Gui calls, ensuring that the initial window is drawn and the Fast3D knows how much space is left for the game to render to.Removed a previously added temporary fix
Gui::SetupRendererFrame()
now that the Draw calls have been split up.