On 3 June 2013 10:05, Mahdi Samadzad <[email protected]> wrote:
> I already have run osgHUD example. It demonstrates how to define a Head Up
> Display layer on top of the 3D scene being rendered. what I need to know is
> how to define within the HUD layer, for instance, a rectangular window
> (viewport) within which a text is being shown and clipped while being
> scrolled. I want each of my indicators to be viewed within a dedicated
> window and get clipped when the drawing oversteps the boundaries of its own
> viewport.
>
> I hope my lengthy comment does not add to the confusion.

viewport in OpenGL has a very specific meaning, from what you are
saying you mean or may not mean something that is associated with and
implmented via a glViewport calls - the osg::Camera's osg::Viewport
wraps this up so the osghud example illustrates this.

Clipping can by done via glScissor which is wrapped up by the
osg::Scissor state attribute.  When you use the osg::Camera for a hud
it also will call glScissor along with glViewport for you to make sure
that the hud doesn't go out beyond it's intended bounds.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to