Hi David,

The Camera::setRenderOrder(..) method is used to control order in
which the cameras on a GraphicsWindow are rendered.

In you application the wish to have a background image is not served
well by creating a separate view for it.  A far better solution would
be to insert a Camera into the scene graph that works as HUD.  See the
osghud example, this would be simpler to manage, and conceptually a
far better fit.

Robert.

On 12/2/08, David Oyarzun <[EMAIL PROTECTED]> wrote:
> Hi all,
>
>     I think I have a problem with the render order of the CompositeViewer.
>     I am trying to program a osg-based windowed application that shows a 3D
> animated object centered in the right middle of the window. Moreover, it has
> a background image that fills all the window, including the right middle
> (behind the 3D model). I want that the application is modular, in the sense
> that depending the initial width and height fo the window, the 3D object
> appears always centered in the right middle.
>     For doing that, I have created a CompositeViewer with 2 views, one of
> them setting the viewport to all the window and putting the background as
> SceneData, and the other one with the right middle size for putting the 3D
> object, but I only see the backgorund image. It seems like the backgorund
> image is always in the front, because if I delete its view, the 3D object is
> well positioned.
>     Could be something related with the render order? If it is, how could I
> tell CompositeViewer to draw the background before the 3D model? Else, is it
> a good idea using the CompositeViewer for this kind of issue?
>
> Thank you in advance,
>
> David.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to