Hi Alexandre,

On Fri, May 15, 2009 at 9:55 AM, Alexandre Amalric
<[email protected]> wrote:
> I do not understand why we only update the projectionOffset  from the slave
> camera and why we don't update the projection matrix itself.

The slave uses a relative reference frame the camera's projection
matrix is update on each new frame by multiplying the master's camer's
projection matrix by the projection offset matrix of the slave.   So
there isn't any point modifying the slave's projection matrix as it'll
be overritten anyway.

In your example I wonder if the problem is down to your have two
camera's, and master camera that is assigned to the graphics window so
gets resized, and a slave camera that gets assigned to the also gets
it's offset resized, putting these two resizes together you'll end up
with a double resize.

Could you changing you example so that the you have the viewer's
master camera (not assigned to the graphics context) , then two slave
cameras to see if it works fine.

In terms of catching this particular usage model in the resize code...
it's a bit awkward, if the master camera to a slave has been resized
and the slave has a relative reference frame then it shouldn't be
resized.  This only works if the master camera shares the same
graphics context, if it doesn't then you'll be a bit stuck as you'd
have to apply the inverse of the master's projection matrix's resizing
to the slaves.

Perhaps this could be done by the resize code detecting a master/slave
set up where double resizes are present, and then have inverse of the
resizes to the master pass down to the slave.

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

Reply via email to