先设置traits->quadBufferStereo = true;
再设置osg:isplaySettings::instance()->setStereoMode( osg::DisplaySettings:UAD_BUFFER );
OSG的渲染线程直接退出了?请问这是什么原因呢?
instance()是单件么?
下面是渲染线程:
while(!viewer->done())
{
osg->reFrameUpdate();
viewer->frame();
osg->PostFrameUpdate();
//Sleep(10); // Use this command if you need to allow other processes to have cpu time
}
The osgteapot example provides an example of integrating OpenGL code
into the OSG. You could also try using a camera post draw callback.
You'll need to insulate your own OpenGL state management from the OSG
and visa versa.
我只是查询下,应该不需要隔离吧,什么原因哦