I run the Examples of boing project in the GLFW.sln.
I found the contents is blocked ,When i press and hold the title bar with the mouse.Like the picture below.
Then i found the docs written by this:
“On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to how event processing is designed on those platforms. You can use the window refresh callback to redraw the contents of your window when necessary during such operations.”
I know the function [window refresh callback ] will automatically get called when resize window, by use [glfwSetWindowRefreshCallback].
But i still not find how to refresh the contents when hold the title bar.
Sorry for my poor english, i use glfw version:3.2, Visual Stuido 2013.
Does anybody know how to resolve this problem?
Here is the picture,the arrows is where I press and hold:
I don’t know the answer off-hand, but here are a few things to try:
Does the refresh callback continue to be called while the title bar is held? A simple test that prints something from within the callback would show this.
If the refresh callback is being called, all you should need to do is re-render the window and swap buffers from within it. In the boing example, I think you just need to copy this code from
main into a callback:
/* Timing */
t = glfwGetTime();
dt = t - t_old;
t_old = t;
/* Draw one frame */
/* Swap buffers */
The problem is that the event processing is blocking your thread from running - i.e. glfwPollEvents() does not return until you are no longer dragging the window.
So if you want to continue rendering (or do any other processing) you need to use another thread.
Thank you for your help.The refresh callback will not to be called while the title bar is held.
And @dougbinks given the solution, i will try it.
thank you for your answer.i’ll try.