Do the following code snippets do the exact same thing?
while (window.isOpen)
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::mouseButtonPressed)
{
// Do something here
}
} // Poll Events
} // Game Loop
bool bolean;
while (window.isOpen)
{
bolean = false;
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::mouseButtonPressed)
{
boolean = true;
}
} // Poll Events
if (boolean)
{
// Do the same thing here
}
} // Gameloop
I am asking this, because you mentioned some sort of delay and timing in my last question and I want to know, if I am understanding this right, so sorry if this question seems stupid.
Thanks,
Kim