From: Nigel Stewart and Fiona Smith <nigels@ni...> - 2003-11-23 23:39:27
Playing with CVS FreeGLUT today, I noticed something a bit
irritating about the resizing behaviour on W2K. When increasing
the size of the window, both WM_SIZE and WM_PAINT events are
received by FreeGLUT. However, when decreasing the size of the
window, only WM_SIZE events are received.
I find it much more consistant for redraws to be always
triggered while resizing the window. So, I added a line to
freeglut_main.c in the WM_SIZE handler, forcing a redisplay:
* We got resized... But check if the window has been already added...
window->State.NeedToResize = GL_TRUE;
window->State.Width = LOWORD(lParam);
window->State.Height = HIWORD(lParam);
From: Nigel Stewart and Fiona Smith <nigels@ni...> - 2003-11-24 00:49:43
A tider way to achieve this via fgInitialize
* Each of the windows should have its own device context...
wc.style = CS_OWNDC | CS_HREDRAW | CS_VREDRAW /* | CS_DBLCLKS */;
CS_HREDRAW Specifies that the entire window is to be redrawn if a movement or size adjustment
changes the width of the client area.
CS_VREDRAW Specifies that the entire window is to be redrawn if a movement or size adjustment
changes the height of the client area.
Get latest updates about Open Source Projects, Conferences and News.