mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
ImGui: add render frame stage and scope mutex
This commit is contained in:
parent
ac5340543c
commit
17385d6f1d
@ -149,8 +149,13 @@ void CImguiSystem::RenderFrame()
|
||||
if (m_systemInitState < ImguiSystemInitStage_e::IM_FRAME_SWAPPED)
|
||||
return;
|
||||
|
||||
AUTO_LOCK(m_snapshotBufferMutex);
|
||||
ImGui_ImplDX11_RenderDrawData(&m_snapshotData.DrawData);
|
||||
{
|
||||
AUTO_LOCK(m_snapshotBufferMutex);
|
||||
ImGui_ImplDX11_RenderDrawData(&m_snapshotData.DrawData);
|
||||
}
|
||||
|
||||
if (m_systemInitState == ImguiSystemInitStage_e::IM_FRAME_SAMPLED)
|
||||
m_systemInitState = ImguiSystemInitStage_e::IM_FRAME_RENDERED;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -44,7 +44,10 @@ private:
|
||||
|
||||
// State gets set to this then buffers have been swapped for the first
|
||||
// time.
|
||||
IM_FRAME_SWAPPED
|
||||
IM_FRAME_SWAPPED,
|
||||
|
||||
// Rendered for the first time.
|
||||
IM_FRAME_RENDERED
|
||||
};
|
||||
|
||||
ImguiSystemInitStage_e m_systemInitState;
|
||||
|
Loading…
x
Reference in New Issue
Block a user