gzz-dev
[Top][All Lists]
Advanced

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

Re: [Gzz] Background


From: Benja Fallenstein
Subject: Re: [Gzz] Background
Date: Thu, 05 Sep 2002 13:43:38 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020615 Debian/1.0.0-3

Tuomas Lukka wrote:

On Thu, Sep 05, 2002 at 12:52:36PM +0200, Benja Fallenstein wrote:
Ah, moment, maybe there was a misunderstanding. I'm not saying that OpenGL should draw vobs in any particular order: I'm saying that the end result on the screen should look like in AWT. I.e., let's say you have overlapping cells two cells, A and B:

+-------+
|   A   +-----+
+-------+ B   |
     +-------+


In these cells, you should see the content of A over the background of A over the content of B over the background of B. You do not, for example, want to see the content of B shown over the background of A. This is what I care about, not warping OpenGL to draw things with the algorithm AWT uses ;-)

Yes, I know. The problem is related to what you said earlier about the background being in coordsys 0. The problem is that the background
vob *doesn't* obey the Z buffer (it clears it) so there the difference
between the two drawing mechanisms is apparent. In AWT, when you draw
something, it's drawn immediately so you have to depth-sort things.
In OpenGL you have the Z buffer so for most things you don't have
to worry about the order.

With the exception of setting modes, and (the current subject) the
background vob. If you draw the background vob at any other time than
right at the beginning, you'll wipe out everything you had drawn
until that. That's the same as in AWT, but here the ordering
is important on the OpenGL side.

Ah, ok. In that case, I *would* suggest special-casing this in GL, simply always drawing cs 0 first, because it is *the* logical place to put the bg vob.

Or hmm-- actually, I do need a bit more explanation here: why does the bg vob have to clear the Z buffer? Why can't the same routine that goes through the vobs and puts them into GL also clean the Z buffer? -- I'd prefer to think about the bg vob as non-magical, just being a big rectangle of some color, so that it could be also used to render the background of e.g. cells.

- Benja





reply via email to

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