nobody wrote on Sunday, September 04, 2005:
Hello everyone!
Suppose we have following code:
void GLFWCALL windowResize( int w, int h )
{
glClear( GL_COLOR_BUFFER_BIT );
std::cout << w << ’ ’ << h << std::endl;
// glfwSwapBuffers /* 1 */
}
int main( int argc, char **argv )
{
…
while( !finished ) {
doSomething();
glfwSwapBuffers();
}
…
}
Now, events are processed during glfwSwapBuffers() call in the main loop. While resizing the program’s window I can see that windowResize( int w, int h ) is being called several times until I release the mouse button. However window’s content doesn’t get redraw. It’s updated (by glClear()) after I stop to resize the window. Things are yet different if I uncomment line marked “1”: now window’s content gets updated instantly, I don’t need to release the button. How come?