Well apparently I did achieve to set up my application with 2 slave camera, but there is one last problem, I'm using a shader for my sky sphere wich isn't working when using 2 slave cameras, has anyone already had trouble with shaders and slave camera ?
2009/5/15 Jean-Sébastien Guay <jean-sebastien.g...@cm-labs.com> > Hi Alexandre, > > 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. >> > > Why don't you update the projection matrix of the master camera? If both > slave cameras render to the same GraphicsContext (i.e. are in the same > window) then it's the right thing to do. You shouldn't touch the slave > cameras' projection matrices, only the master camera's projection matrix and > the slave cameras' projection offsets. > > 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 ;-) >> > > Well if you mean that it doesn't do the right thing when you have one > master camera and one slave camera, both with graphics contexts, then you're > right, but that's expected because it's not a valid use case. You should use > a master camera with no graphics context, and two slave cameras with > graphics contexts (perhaps the same one). See the code for > osgViewer::View::setUpViewOnAllScreens() for an example of this. > > Perhaps a test could be added to catch that kind of utilization and warn > the user that their view's camera setup is invalid. > > Go back to my previous message, really it makes sense. You have the master > camera which in this case is only there to represent the viewer's position. > So that's what the CameraManipulator acts upon, but it has no > GraphicsContext so it doesn't render anything by itself. And then you have > two slave cameras which have viewpoints and projections offset from the > master camera, and which do the actual rendering, hence they have > GraphicsContexts. > > Hope this helps, > > > J-S > -- > ______________________________________________________ > Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com > http://www.cm-labs.com/ > http://whitestar02.webhop.org/ > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > 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 osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org