Re: chan->clear

New Message Reply Date view Thread view Subject view Author view

From: Allan Schaffer (allan++at++southpark.engr.sgi.com)
Date: 07/12/2000 01:35:09


On Jul 11, 10:04pm, Larry Ramey wrote:
> Are these two statements equivilent?
> chan->clear();
> and
> glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

They're not; chan->clear() does quite a number of extra things,
  - draw the earthsky if there is one
  - else, pfClear(PFCL_COLOR | PFCL_DEPTH, NULL);

  pfClear:
    - increments the clear stats
    - handles color-index mode vs RGB mode clears
    - adds the clear to a pfDisplayList (if necessary)
    - handles scissoring
    - sets the clear color
    - calls glClear()
    - more/etc.

So if you don't have a pfEarthSky to deal with then the above can all
be handled by directly calling pfClear(). The 2nd argument to
pfClear is the clear color. (or default to black, if NULL)

Allan

-- 
Allan Schaffer                                            allan++at++sgi.com
Silicon Graphics                           http://reality.sgi.com/allan


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Jul 12 2000 - 01:35:12 PDT

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