void updateWindow(_GAME *pGame)
{
while (window.isOpen()) {
sf::Event event;
while (window.pollEvent(event)) {
// Process ImGui along with the SFML event
ImGui::SFML::ProcessEvent(event);
if (event.type == sf::Event::Closed) {
window.close();
}
// ImGui::EndFrame(); ????? <- shouldn't be called!
}
ImGui::SFML::Update(window, dt);
...
// call LogonWindow here
window.clear(sf::Color::Black);
//window.clear(sf::Color::Black);
ImGui::SFML::Render(window);
window.display();
}
ImGui::SFML::Shutdown();
}
void updateWindow(_GAME *pGame)
{
while (window.isOpen()) {
sf::Event event;
while (window.pollEvent(event)) {
// Process ImGui along with the SFML event
ImGui::SFML::ProcessEvent(event);
if (event.type == sf::Event::Closed) {
window.close();
}
// ImGui::EndFrame(); ????? <- shouldn't be called!
}
ImGui::SFML::Update(window, dt);
...
// call LogonWindow here
window.clear(sf::Color::Black);
//window.clear(sf::Color::Black);
ImGui::SFML::Render(window);
window.display();
}
ImGui::SFML::Shutdown();
}
Thank you! I noticed I messed up ImGui::SFML::Update. Everything works fine now :)
Solution: If someone stumbles upon the same issue in the future, please refer to Elias Daler's code snippet above.