Re: Clear Screen is too slow, what else?

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (angus++at++division.demon.co.uk)
Thu, 15 Dec 1994 17:41:48 +0000


> Thus, I decided to use a draw function callback that only draws the
> objects and does not perform a screen clear.

> To remove the objects drawn in the previous frame I created a second
> channel that is supposedly rendered first. The draw function callback
> of this channel is supposed to draw the the same objects as seen from
> the previous viewpoint, but with the color of the objects set to
> black, the background color. To achieve the color change, I issued a
> cpack(0xFFFFFFFF) in the draw function callback of the channel
> supposed to draw white objects from the new viewpoint and a
> cpack(0xFF000000) in the draw function callback of the channel
> supposed to draw black objects from the old viewpoint.

Hi Marcus,
        the problem with your example code is that it it doesn't account for
double buffering. The last view drawn (and the one you try to erase with black)
is in the frontbuffer while you are drawing to the backbuffer. Try erasing
using the view position of two frames ago. You will probably also have to
disable the zbuffer in some way.

Regards,

-- 
________________________________________________
 Angus Dorbie                 Division Ltd,
 Software Engineer            19 Apex Court,
 Tel: (01454)615554           Woodlands,
 Fax: (01454)615532           Bristol BS12 4JT,
 angus++at++division.demon.co.uk   UK
________________________________________________

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:44 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.