Can somebody tell me why this programm snippet always uses the else-case and ignores the if-cases? What can I do to hold the program until the user decides to press a key?
if (keys[VK_LEFT])
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer
glColorMask(GL_FALSE, GL_TRUE, GL_TRUE, GL_FALSE);
}
if (keys[VK_RIGHT])
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer
glColorMask(GL_FALSE, GL_TRUE, GL_FALSE, GL_FALSE);
}
else
{
exit(0);
}