From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: What is faster as memcpy??? Date: 18 Sep 2000 13:05:18 GMT Organization: Aachen University of Technology (RWTH) Lines: 35 Message-ID: <8q53ue$l8g$1@nets3.rz.RWTH-Aachen.DE> References: <8pqfb2$hmk$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 969282318 21776 137.226.32.75 (18 Sep 2000 13:05:18 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 18 Sep 2000 13:05:18 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Riox92 wrote: [...] > I draw my objects in the virtual screen and when finished I memcpy the > vir_screen to the LFB_screen Right. That's how it's supposed to be done; setting aside you might want to use _movedata() so you can avoid nearptr mode, as necessitated by memcpy() to access the real frame buffer. > It works ok if i need to draw a lot of polygons and vectors, but if i want > to make a simple starfiel it shows the old screen under the new screen. Under as in 'behind', i.e. the old stars don't get erased properly, or as in 'further down the screen'? In the latter case, what you observe is a more of a synchronization problem than one about speed. The trick is to start the copying just as the CRT's electron beam wrote the first few lines of pixels, so you're running after it, and you have about one frame of time to complete the blitting. If you don't do this synchronization, you'll sometimes be overtaken by the beam, leading to the observed effect that the lower part of the picture is older than the upper one. > like i said. but then when i move 1 pixel over the screen over a sin*rad > horizontal or vertical it shows a effect like a shading.... That's probably coming from the slowness of the phosphor, partly, plus the fact that a point spends much more time at the extreme points of a smooth curve (like the sine curve) than in the middle of it (its velocity is much larger around y=0 than at y= +/- 1) -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.