gzz-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz] Re: [Gzz-commits] gzz gzz/client/AbstractShower.java gzz/client/F.


From: Tuomas Lukka
Subject: [Gzz] Re: [Gzz-commits] gzz gzz/client/AbstractShower.java gzz/client/F...
Date: Thu, 29 Aug 2002 13:13:23 +0300
User-agent: Mutt/1.4i

> Ok, I see the point. This is what I'd *like* certainly, but in AWT, we 
> need to do some magic to do the depth fading, and we need the background 
> color for that... Ideas?

Well, we just "magically" get the background vob from the vobscene and
use its contents.

> >There's an interesting point of GL performance: if you're going
> >to write RGB data to every point on screen, you shouldn't clear
> >the RGB buffer at all, only the depth buffer. This saves time,
> >and e.g. Quake3 does this.
> >
> 
> I don't understand... What's an RGB buffer, and what's a depth buffer?

In OpenGL, to each pixel there are associated
- RGBA values
- depth value
- stencil value
And possibly other, auxiliary values.

The depth buffer is used for hidden-surface erasing: when drawing
fragments (pixels) to the screen, OpenGL can be instructed to test the depth
of the fragment against the value currently in the depth buffer.
The fragment is then drawn only if the test goes a certain way;
you set the test using
        glEnable(GL_DEPTH_TEST)
        glDepthFunc(...)

When clearing, you have a choice of what buffers to clear.
        glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
clears both depth and color values. What I'm saying above is that
it's pretty commonly known that if you can get away with it,
you should use
        glClear(GL_DEPTH_BUFFER_BIT);
because it's faster.

        Tuomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]