|
|
|
@ -117,21 +117,24 @@ int main(int, char**)
|
|
|
|
|
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
|
|
|
|
|
|
|
|
|
|
// Main loop
|
|
|
|
|
MSG msg;
|
|
|
|
|
ZeroMemory(&msg, sizeof(msg));
|
|
|
|
|
while (msg.message != WM_QUIT)
|
|
|
|
|
bool done = false;
|
|
|
|
|
while (!done)
|
|
|
|
|
{
|
|
|
|
|
// Poll and handle messages (inputs, window resize, etc.)
|
|
|
|
|
// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
|
|
|
|
|
// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
|
|
|
|
|
// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
|
|
|
|
|
// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
|
|
|
|
|
if (::PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE))
|
|
|
|
|
MSG msg;
|
|
|
|
|
while (::PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE))
|
|
|
|
|
{
|
|
|
|
|
::TranslateMessage(&msg);
|
|
|
|
|
::DispatchMessage(&msg);
|
|
|
|
|
continue;
|
|
|
|
|
if (msg.message == WM_QUIT)
|
|
|
|
|
done = true;
|
|
|
|
|
}
|
|
|
|
|
if (done)
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
// Start the Dear ImGui frame
|
|
|
|
|
ImGui_ImplDX12_NewFrame();
|
|
|
|
|