Skip to content

Commit

Permalink
Added live resizing to splitview example.
Browse files Browse the repository at this point in the history
Fixes #424.
  • Loading branch information
elmindreda committed Mar 15, 2015
1 parent 75b7720 commit cb11b7c
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions examples/splitview.c
Expand Up @@ -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;
}


Expand Down Expand Up @@ -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();
Expand Down

2 comments on commit cb11b7c

@dmitshur
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really cool! Thanks!

live resizing

@elmindreda
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😌

Please sign in to comment.