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

Re: GL viewports




> You can't draw the GUI just once in the same rendering context (window)
> as the 3D stuff if you are using double-buffered rendering context.
> On some cards you can render the GUI twice (once in the front buffer
> and again in the back) - but that's not legal OpenGL because the
> contents of the back buffer following a buffer swap is undefined - and
> *might* not contain what was in the front buffer just before the swap.

Oh yes. I'd forgotten that. Pants.

Hmm. I could probably just blast the thing across as a direct
write. It's just that basically it'll take up a lot of texture memory
on small cards to have a 100x640 pixel panel sat in there.

{No, I don't know what to do about variable sized displays yet. We're
still ambling about debating this plan.}

I could render the whole thing in bits I supposed... but it's kind of
fiddly. Each UI component is a bundle of overlayed images and a (not
small) stream of text. (hence rendering it all at pixel level, to try
and get it small and sharp).

> 1) Draw the GUI into a different window using a single-buffered context.

Won't work on full-screen only cards. I do plan to support having it
in a separate window, so people with windowable displays &/or >1
screen can use it that way.

(Actually, ideal way to play this game is one big 3D display and a
second monitor with an X11 UI on it.)

Mind you, that's all off in the distance.

> 2) Redraw the GUI every frame along with the 3D stuff.

Might have to do that then. At least to try the UI out. Hmm. Feel some
long "lying in the sun pondering things" days coming on...

> If you choose (2) or (3) you'll need to draw the GUI using OpenGL
> commands, for which you could use my 'PUI' library, or another
> package called 'GLUI'...there are probably other choices also.

If I'm rendering over the 3D display there are some requirements.. :-)
I'll need to render the thing as a translucent tree structure...

{ Hmm... actually that could be quite neat. OHH!!! Why the F aren't PC
monitors widescreen format. That would rock tremendously... whole
visual system would work then. Dammit. }


---------------------------------------------------------------------
To unsubscribe, e-mail: linuxgames-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: linuxgames-help@sunsite.auc.dk