Skip to content

Commit

Permalink
params.callback.PreNewFrame before all NewFrame (Backends and ImGui)
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Dec 19, 2023
1 parent 8a28a91 commit b771cdd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hello_imgui/internal/backend_impls/abstract_runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,9 @@ void AbstractRunner::CreateFramesAndRender()
//
// Rendering logic
//
if (params.callbacks.PreNewFrame)
params.callbacks.PreNewFrame();

mRenderingBackendCallbacks.Impl_NewFrame_3D();
Impl_NewFrame_Backend();
{
Expand All @@ -621,9 +624,6 @@ void AbstractRunner::CreateFramesAndRender()
io.DeltaTime = 1.f / 60.f;
}

if (params.callbacks.PreNewFrame)
params.callbacks.PreNewFrame();

ImGui::NewFrame();

// Fight against potential font loading issue
Expand Down

0 comments on commit b771cdd

Please sign in to comment.