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