Message-ID: <33FEA990.75815B64@bspu.ac.by> Date: Sat, 23 Aug 1997 12:12:48 +0300 From: Alexander Bokovoy Organization: BSPU named after Maxim Tank MIME-Version: 1.0 To: syzmik AT concentric DOT net CC: djgpp AT delorie DOT com Subject: Re: GRX 2.0 and Mouse Flicker Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Precedence: bulk > After hacking up some code for using the mouse, in polled mode, I was > horrified by the amount of flicker. Can someone post interrupt driven or > some flicker free mouse code for GRX v2? Here's what I got: [snip] > > while (!(MS.buttons & GR_M_RIGHT)) > { > GrMouseGetEvent(GR_M_POLL, &MS); > if (MS.buttons & GR_M_LEFT) > GrPlot(MS.x, MS.y, 15); > } > [snip] For flicker free mouse you should hide mouse before your drawing because if you do not this GRX will hide/show mouse evertime when you call draw functions. E.g. : > while (!(MS.buttons & GR_M_RIGHT)) > { > GrMouseGetEvent(GR_M_POLL, &MS); > if (MS.buttons & GR_M_LEFT) { GrEraseMouseCursor(); // DO some drawings > GrPlot(MS.x, MS.y, 15); GrDisplayMouseCursor(); } > } And if you drawing is big (e.g more 10 draw calls at one time) this trick not only kill flicks but dramastically speed graphics output. I beleive that this GrPlot call not the one call in this cicle in your real program :) -- Alexander Bokovoy, ---== The Soft Age coming soon ==---