as per Ioannis Petikas' suggestion on the mailing list, set NeedToResize
to false before calling fghReshapeWindow git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1344 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
ad98f1af5f
commit
1bca835536
@ -88,6 +88,7 @@ static void fghReshapeWindow ( SFG_Window *window, int width, int height )
|
|||||||
* the already-drawn part does not get drawn again and things look funny.
|
* the already-drawn part does not get drawn again and things look funny.
|
||||||
* But without this we get this bad behaviour whenever we resize the
|
* But without this we get this bad behaviour whenever we resize the
|
||||||
* window.
|
* window.
|
||||||
|
* DN: Hmm.. the above sounds like a concern only in single buffered mode...
|
||||||
*/
|
*/
|
||||||
window->State.Redisplay = GL_TRUE;
|
window->State.Redisplay = GL_TRUE;
|
||||||
|
|
||||||
@ -120,13 +121,17 @@ void fghRedrawWindow ( SFG_Window *window )
|
|||||||
|
|
||||||
if( window->State.NeedToResize )
|
if( window->State.NeedToResize )
|
||||||
{
|
{
|
||||||
|
/* Set need to resize to false before calling fghReshapeWindow, otherwise
|
||||||
|
in the case the user's reshape callback calls glutReshapeWindow,
|
||||||
|
his request would get canceled after fghReshapeWindow gets called.
|
||||||
|
*/
|
||||||
|
window->State.NeedToResize = GL_FALSE;
|
||||||
|
|
||||||
fghReshapeWindow(
|
fghReshapeWindow(
|
||||||
window,
|
window,
|
||||||
window->State.Width,
|
window->State.Width,
|
||||||
window->State.Height
|
window->State.Height
|
||||||
);
|
);
|
||||||
|
|
||||||
window->State.NeedToResize = GL_FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
INVOKE_WCB( *window, Display, ( ) );
|
INVOKE_WCB( *window, Display, ( ) );
|
||||||
|
Reference in New Issue
Block a user