[comp.sys.sgi] clear

sweetmr@SCT60A.SUNYCT.EDU (michael sweet) (04/11/91)

Re:  drawing into the background

> How can I solve this problem, i.e., why doesn't clear() work?

Well, clear() works fine, but you are only working on the back buffer when
drawing (by default.)  One thing that I do (with my stars program) is to
have a clear() count- when a REDRAW event comes in, this is set to 2 so both 
buffers get cleared.  Another way would be to enable the clearing on both
windows:

 frontbuffer(TRUE);
 backbuffer(TRUE); /* default */

and then clear().  Be sure to turn the frontbuffer off with frontbuffer(FALSE)
after the clear, tho...

 -Mike