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

Re: GL viewports



Keith Lucas wrote:
> 
> What's a good way to get OpenGL to render just a bit of the display?
> 
> What I need is a 3D view and a bit of 2D UI. So I figured I can set
> the viewport up to draw the 3D view most of the time and just rewire
> it to draw the 2D UI when that changes.
> 
> Is that sensible?
> 
> Do the 2D operations get clipped by the viewport? (I'm assuming they
> will, because that would be the sensible thing.)
> 

I have used viewports to render multiple 3d scenes on the screen.
It certainly works.

Regarding clipping I think that things like wide lines and
wide points will leak out of the viewport. The viewport clipping
will only force their centers to be inside the viewport, the
"wide" stuff can go outside. 

Scissor can be used to fix that, but I am afraid that that
might switch the rendering to software path on some implementations.

But for "normal" things like triangles or thin lines you
should be fine without scissor.


		Eero

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