1. help: flickering animations
- Posted by Mike.Burrell at GEOCITIES.COM Jul 16, 1997
- 648 views
i'm trying to do some 3D and stuff which is going great except for a few things (i'm going to break this up into 2 messages because they deal with different things)... anyway about my flickering it seems to me that i'm already starting to erase what i've just drawn when the screen refreshes, so i'm left sometimes with half a cube on screen, sometimes with the whole cube, sometimes with no cube at all... what i'm wondering is...how can wait until the screen refreshes before i start erasing?? do i have to know the refresh rate of the screen and then use a timer?? if so how do i figure out the refresh rate (i'm designing this so i can be used in any screen mode) . o O Mike Burrell O o . . o O burrellm at geocities.com O o . . o O mikpos.base.org O o .
2. Re: help: flickering animations
- Posted by Greg Harris <blackdog at CDC.NET> Jul 16, 1997
- 662 views
> it seems to me that i'm already starting to erase what i've just > drawn when the screen refreshes, so i'm left sometimes with half a > cube on screen, sometimes with the whole cube, sometimes with no cube > at all... > > what i'm wondering is...how can wait until the screen refreshes > before i start erasing?? do i have to know the refresh rate of the > screen and then use a timer?? if so how do i figure out the refresh > rate (i'm designing this so i can be used in any screen mode) You can do one of two things. Wait for the retrace (which happens at 70 Hz, but I might be wrong) and blast to the screen. You only have about 70 ms to do this before the image is displayed on the screen. There was some code posted to the list server a while back to take care of this. The second method is to write to a virtual screen, then copy to the video display. This however might not work well in all modes (Due to the VGA hardware limits) Hope this helps.. Greg Harris blackdog at cdc.net