Hi jean-sébastien,

Your explanation is very clear.

My problem is that when I configure my application like that (2 slaves
cameras) I have a lot of weird behaviour (some of my models aren't
displayed, interraction with mouse and keyboard are odd), so I found a much
simple solution wich is to set my own resize callback to my graphic context.

In my resize implementation I directly update the projection matrix from the
slave camera and I don't update the _projectionOffset wich for me is
useless.

I still think that future osg version should correct the default
resizeimplementation because this behaviour seems very strange to me, maybe
am I the only one to think so ;-)

2009/5/15 Jean-Sébastien Guay <[email protected]>

> Hi Alexandre,
>
>  something isn't right with the last thing I said, when creating a new
>> osgViewer::View a main camera is created by default, so it's not possible to
>> have 2 slave cameras only and no main camera, am I right ?
>>
>
> Of course, an osgViewer::View will always have a main camera. This is the
> camera that is used for user interaction, etc. But it does not render
> anything, only the two slaves have GraphicsContexts attached. Check it out,
> try view->getCamera()->getGraphicsContext(), you will get 0, but if you try
> it on both slaves you will get a valid GraphicsContext (it could be the same
> one).
>
> So your goal of having only 2 cameras rendering will be met by this setup.
> The slave cameras render using view and projection matrix offsets from the
> master camera, and user interaction (say using a camera manipulator) moves
> the main camera's view matrix and thus affects the slaves indirectly.
>
> Hope this clears things up,
>
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay    [email protected]
>                               http://www.cm-labs.com/
>                        http://whitestar02.webhop.org/
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Alexandre AMALRIC                   Ingénieur R&D
===================================
PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille
http://www.pixxim.fr
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to