I have a visualization stereo problem under windows with opensg ( I should let notice that the same application in linux works!!!!)
 
this is a peace of my code:

ViewportPtr os,od,sx,dx;

StereoBufferViewportPtr sxs=StereoBufferViewport::create();

StereoBufferViewportPtr dxs=StereoBufferViewport::create();

//get the left old viewport from actual windows

os=win->getPort(0);

//get the old right viewport from actual window

od=win->getPort(1);

beginEditCP(sxs);

{

sxs->setCamera(cam_sx);

sxs->setBackground(os->getBackground());

sxs->setRoot(os->getRoot());

//sxs->setSize(os->getLeft(),os->getBottom(),os->getRight(),os->getTop());

sxs->setSize(0.0f,0.0f,.5f,1.0f);

sxs->setLeftBuffer(true);

sxs->setRightBuffer(false);

}

endEditCP(sxs);

beginEditCP(dxs);

{

dxs->setCamera(cam_dx);

dxs->setBackground(os->getBackground());

dxs->setRoot(os->getRoot());

dxs->setSize(0.0,0.0f,.5f,1.0f);

dxs->setLeftBuffer(false);

dxs->setRightBuffer(true);

}

endEditCP(dxs);

sx=sxs;

dx=dxs;

beginEditCP(win);

{

//toggle old viewport and add new viewports to the output window

win->subPort(os);

win->subPort(od);

win->addPort(sx);

win->addPort(dx);

}

sx = win->getPort(0);

dx = win->getPort(1);

endEditCP(win);

 

The result is that the left viewport is visible,and the right viewport is invisible....

I have a Quadro Fx 1100 ad the option for stereo is enabled....

thanks for your help!

 

Davide


Scopri Mister Yahoo! - il fantatorneo sul calcio di Yahoo! Sport'

Reply via email to