[osg-users] mirrorize a slave with a offset from the master camera

Johan Johnsson eslave at gmail.com
Tue Sep 11 03:26:04 PDT 2007


On Tue, 11 Sep 2007 11:10:09 +0200, Robert Osfield  
<robert.osfield at gmail.com> wrote:

> On 9/11/07, Johan Johnsson <eslave at gmail.com> wrote:
>> > You just need to scale the y axis by -1, then flip the front face to
>> > prevent the wrong faces from being culled.
>> addSlave(camera.get(),osg::Matrixd::scale(1,-1,1),offsetMatrix);
>> it's get upside down :S
>
> Opps... try the x axis...

Magical :D, it worked , altho the culling isnt that easy as it may seem ?
getCamera()->getStateSet()->setMode(GL_CULL_FACE,  
osg::StateAttribute::OVERRIDE|osg::StateAttribute::OFF);
now it works, .. but i dont just want my mirror camera to be affected.. it  
now affect all cameras (all slaves)

well i tried :

getSlave(0)._camera->getOrCreateStateSet()->setMode(GL_CULL_FACE,  
osg::StateAttribute::OVERRIDE|osg::StateAttribute::OFF);

nothing happend ?..

i set the "viewer->getCamera()->setCullMask(0xffffffff);"


> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



More information about the osg-users mailing list