Hi Adrian,

Does the master camera have a graphics context associated with it? If
so perhaps you could re-arrange things so that the master camera has
no graphics context, and the only slaves have graphics contexts, this
way local slave changes wouldn't affect other slaves.

Robert.

On Mon, Jan 26, 2009 at 1:43 PM, Adrian Egli OpenSceneGraph (3D)
<[email protected]> wrote:
> Sorry Robert,
>
> I should precise in detail my problem. Each slave gets updated each frame.
>
> osg54-osgd.dll!osg::View::updateSlave(unsigned int i=0)  Line 154    C++
> osg54-osgd.dll!osg::View::updateSlaves()  Line 144 + 0xc bytes    C++
> osg54-osgViewerd.dll!osgViewer::Viewer::updateTraversal()  Line 927 + 0xe
> bytes    C++
> osg54-osgViewerd.dll!osgViewer::ViewerBase::frame(double
> simulationTime=1.7976931348623157e+308)  Line 607 + 0xf bytes    C++
>
>
> And the slave gets the master camera's projection matrix * offset. so what
> happends when we resize the master camera, the aspect ration gets changed,
> and then it has also
> an impact to the slave camera. so should we apply an slave inverse master
> projection * slave projection => slave._projectionOffset, make not much
> sense w.r.t. performance
> or should be change to Reference Frame : Absolute, and update each time the
> view matrix externally. or should be fix this in the code.
>
>
> void View::updateSlave(unsigned int i)
> {
>     if (i >= _slaves.size() || !_camera) return;
>
>     Slave& slave = _slaves[i];
>
>     if (slave._camera->getReferenceFrame()==osg::Transform::RELATIVE_RF)
>     {
>         slave._camera->setProjectionMatrix(_camera->getProjectionMatrix() *
> slave._projectionOffset);
>         slave._camera->setViewMatrix(_camera->getViewMatrix() *
> slave._viewOffset);
>     }
>
>     slave._camera->inheritCullSettings(*_camera,
> slave._camera->getInheritanceMask());
> }
>
>
>
> 2009/1/26 Robert Osfield <[email protected]>
>>
>> Hi Adrian,
>>
>> You can control the management of the projection matrix w.r.t resizing
>> via osg::Camera methods.  I can't recall them off the top of my head,
>> go have a browse.
>>
>> Robert.
>>
>> On Mon, Jan 26, 2009 at 10:20 AM, Adrian Egli OpenSceneGraph (3D)
>> <[email protected]> wrote:
>> > Hi Robert,
>> >
>> > for each slave camera, osg overwrites the projection matrix (each
>> > frame).
>> > what happends when i have a slave with w=1,h=1 and a second w=2,h=1
>> > ->the
>> > aspection ratio should be different, but i get wrong output. i believe
>> > that
>> > the aspect ratio
>> > gets overwritten with the master cams, this is for example similart to
>> > the
>> > first slave w=1,h=1. do i right understand the osg? if yes, how should
>> > if
>> > fix this issue in our appliction
>> >
>> > adrian
>> >
>> > --
>> > ********************************************
>> > Adrian Egli
>> >
>> > _______________________________________________
>> > osg-users mailing list
>> > [email protected]
>> >
>> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>> >
>> >
>> _______________________________________________
>> osg-users mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
> --
> ********************************************
> Adrian Egli
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to