Mail Archives: djgpp/1997/02/04/00:58:58
Ian Mausolus (mausolus AT ican DOT net) wrote:
: What is that vertical retrace stuff all about? Do you actaully have to
: check to see if the video card or monitor is finished drawing to the screen
: before displaying another picture? and how do you do that?
You don't have to wait for vertical retrace, but it could make your
animations look smoother by avoiding shearing.Her is how it's done:
#include <pc.h>
#define RetracePort 0x03DA
void WaitVertRetrace(void)
{
while(inportb(RetracePort) & 0x08); // wait for end if already in VR
while(!(inportb(RetracePort) & 0x08)); // wait for VR to start...
// this way you get the entire VR
}
JL
- Raw text -