Two un-important questions (mostly)

Started by
2 comments, last by The_Nerd 19 years, 5 months ago
One: Is OpenGL 2.0 out yet and is it supported on Linux? Two: I remember someone saying that you can use clipplans instead of using the stencil test, cissor box, or glviewport. What way is the best to clip allot of stuff inside allot of rectangles (to be exact, clipping GUI object's children for a GUI system)? Also, is it possible to clip to a rectangular area any where on the screen using clipplans?
-- I waz here --
Advertisement
1/ i believe only with 3dlabs cards, though ati/nvidia are nearly there.
2/ scissor is the best but the problem is u only have one of them, viewport is something else (so it doesnt count).
though for a GUI ild use nothing, ie whats the purpose of clipplanes in this case
Viewport sets the transform but does no clipping. If you want to make sure your gui element does not go outside a rectangle then use a scissor test. You do only get one at a time, but you can change it for each gui item. If you want to clip gui items to each other you could control the draw order to draw the top ones first or you could use the depth buffer and draw them at different z values. If you really need complex screen space clipping you could also use the stencil buffer.

From your description it sounds like you want to make sure a gui child is clipped to it's parent's rectangle. In that case before you draw each child just set the scissor rect to the parent rect.

You could also use clip planes, but they don't really make sense for 2d usually. You should be able to get the same effect here with scissor rect.

Thank you.
-- I waz here --

This topic is closed to new replies.

Advertisement