Xref: news2.mv.net comp.os.msdos.djgpp:3049 From: ey200 AT hermes DOT cam DOT ac DOT uk (E. Young) Newsgroups: comp.os.msdos.djgpp Subject: double buffering with GRX2.0 Date: 24 Apr 1996 09:31:23 GMT Organization: University of Cambridge, England Lines: 35 Message-ID: <4lksdb$jro@lyra.csx.cam.ac.uk> NNTP-Posting-Host: hammer.thor.cam.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp I'm trying to double buffer an SVGA screen; the code below is my attempt. Everything is fine, except a certain amount of screen flicker. Can anyone tell me why this is happening? The same "wait" function works fine for VGA screens using DJGPP, giving a rock-steady picture. Thanks, -Edwin #include #include #include void WaitRetrace(); main() { // virtual screen 2x as high as visible screen GrSetMode(GR_custom_graphics,640,480,256,640,960); int i=0; while(!kbhit()){ // fill other screen with colour GrFilledBox(0, (GrViewportY() ? 0 : 480), 639,(GrViewportY() ? 0 : 480)+479,i++); WaitRetrace(); GrSetViewport(0,480-GrViewportY()); } GrSetMode(GR_default_text); } void WaitRetrace() { while(!inportb(0x03DA) & 0x08); while(!inportb(0x03DA) & 0x08); }