Dear Maurice,
Thanks for your answer, I will follow your suggestions and do some tests.
Regards,
JH
----- Original Message ----- From: "Maurice Lombardi" Maurice.Lombardi@ujf-grenoble.fr To: grx@gnu.de Sent: Saturday, December 11, 2010 7:25 PM Subject: Re: Batch drawing to memory only for less screen flickering
Le 10/12/2010 17:56, Mariano a écrit :
El 10/12/10 10:24, Maurice Lombardi escribió:
Le 09/12/2010 08:20, jhliu a écrit :
There is an example of a general solution in the demogrx test program. The running banner is drew in a memory context and them bitblt to the screen (see the paint_animation function).
Indeed, this is the way the "saucer" is drawn in the GetImage / PutImage demo in the bgi/bccbgi program, when multiple paging is not available, i.e. in all cases except some VESA/DJGPP modes. See the sources in src/bgi/getimage.c. I was supposing that the OP had in mind a common practice in slow systems in the old times: There are two pages in memory and the "visual page" is switched between the two nearly instantaneously (in fact at the start of the next refreshing of the screen). This is why it exists only in the old DOS system VESA/DJGPP. In modern times the drawing is made in memory in a minimal rectangle (not the whole screen), and the actual refreshing is deferred to the Windows system through an InvalidateRect() function (or to the X11 system through an PIXEL_CACHE_INVALIDATE() macro). I am not sure there is really an advantage in the old way of doing without availability of the special card function.
Maurice
-- Maurice Lombardi Laboratoire de Spectrometrie Physique, Universite Joseph Fourier de Grenoble, BP87 38402 Saint Martin d'Heres Cedex FRANCE Tel: 33 (0)4 76 51 47 51 Fax: 33 (0)4 76 63 54 95 mailto:Maurice.Lombardi@ujf-grenoble.fr from January 1st, 2011, the Laboratoire de Spectrométrie Physique will become the LABORATOIRE INTERDISCIPLINAIRE DE PHYSIQUE (LIPhy).
Grx mailing list Grx@gnu.de https://www.g-n-u.de/mailman/listinfo/grx