[SDL] Re: Reacting to window resize events
Andreas Bombe
bombe at informatik.tu-muenchen.de
Wed Jul 2 06:43:01 PDT 2003
On Tue, Jul 01, 2003 at 03:19:25PM -0500, Bob Pendleton wrote:
> If you use a while(poll) loop to handle events you can set a flag and
> save state each time you get a resize event inside the loop, and then
> only do the call to SetVideoMode() out side the loop. That is, you
> receive any number of resize events in the loop, but only respond to the
> last one you see.
That makes it less likely, but it's still skippy. It's what I do now,
but without a delay after the last resize event, it still looks like
this:
346 frames, 114.95 s, 1.9 fps
resize event 672x641
resizing to 672x641
resize event 681x656
resizing to 681x656
resize event 687x668
resizing to 687x668
349 frames, 116.48 s, 2.0 fps
resize event 700x687
resizing to 700x687
resize event 705x692
resizing to 705x692
resize event 700x687
resizing to 700x687
352 frames, 118.18 s, 1.8 fps
resize event 705x692
resizing to 705x692
355 frames, 119.40 s, 2.5 fps
Nevermind the low fps, it's just Mesa on this computer (which means that
the X server was hit by software rendering). The frame counters are
printed approximately every 1.5 seconds, I was slowly and continuously
enlarging the window with the mouse.
--
Andreas Bombe <bombe at informatik.tu-muenchen.de> DSA key 0x04880A44
More information about the SDL
mailing list