mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 01:55:09 +00:00
parent
75b7720d00
commit
cb11b7ca6f
@ -371,7 +371,9 @@ static void framebufferSizeFun(GLFWwindow* window, int w, int h)
|
||||
|
||||
static void windowRefreshFun(GLFWwindow* window)
|
||||
{
|
||||
do_redraw = 1;
|
||||
drawAllViews();
|
||||
glfwSwapBuffers(window);
|
||||
do_redraw = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -485,15 +487,7 @@ int main(void)
|
||||
{
|
||||
// Only redraw if we need to
|
||||
if (do_redraw)
|
||||
{
|
||||
// Draw all views
|
||||
drawAllViews();
|
||||
|
||||
// Swap buffers
|
||||
glfwSwapBuffers(window);
|
||||
|
||||
do_redraw = 0;
|
||||
}
|
||||
windowRefreshFun(window);
|
||||
|
||||
// Wait for new events
|
||||
glfwWaitEvents();
|
||||
|
Loading…
Reference in New Issue
Block a user