Fixes to the multipipe initialization.
This commit is contained in:
@@ -99,7 +99,7 @@ void DisplaySettings::setDefaults()
|
||||
_minimumNumberAlphaBits = 0;
|
||||
_minimumNumberStencilBits = 0;
|
||||
|
||||
_maxNumOfGraphicsContexts = 1;
|
||||
_maxNumOfGraphicsContexts = 3;
|
||||
}
|
||||
|
||||
static ApplicationUsageProxy DisplaySetting_e0(ApplicationUsage::ENVIRONMENTAL_VARIABLE,"OSG_STEREO_MODE <mode>","QUAD_BUFFER | ANAGLYPHIC | HORIZONTAL_SPLIT | VERTICAL_SPLIT | LEFT_EYE | RIGHT_EYE");
|
||||
|
||||
@@ -73,7 +73,15 @@ std::string extractCameraConfigFile(osg::ArgumentParser& arguments)
|
||||
}
|
||||
|
||||
std::string filename;
|
||||
if (arguments.read("-c",filename)) return filename;
|
||||
if (arguments.read("-c",filename)) return findCameraConfigFile(filename);
|
||||
|
||||
char *ptr;
|
||||
if( (ptr = getenv( "PRODUCE_CAMERA_CONFIG_FILE" )) )
|
||||
{
|
||||
osg::notify(osg::DEBUG_INFO) << "PRODUCE_CAMERA_CONFIG_FILE("<<ptr<<")"<<std::endl;
|
||||
return findCameraConfigFile(ptr);
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -262,6 +270,8 @@ void OsgCameraGroup::realize( ThreadingModel thread_model)
|
||||
// create the scene handler.
|
||||
osgProducer::OsgSceneHandler *sh = new osgProducer::OsgSceneHandler(_ds.get());
|
||||
sh->setDefaults();
|
||||
sh->getState()->setContextID(i);
|
||||
|
||||
_shvec.push_back( sh );
|
||||
cam->setSceneHandler( sh );
|
||||
|
||||
|
||||
@@ -81,16 +81,20 @@ void SceneView::setDefaults()
|
||||
_renderStage = new RenderStage;
|
||||
|
||||
|
||||
#ifndef __sgi
|
||||
DisplayListVisitor::Mode dlvMode = DisplayListVisitor::COMPILE_DISPLAY_LISTS|DisplayListVisitor::COMPILE_STATE_ATTRIBUTES;
|
||||
|
||||
#ifdef __sgi
|
||||
dlvMode = DisplayListVisitor::COMPILE_STATE_ATTRIBUTES;
|
||||
#endif
|
||||
|
||||
// sgi's IR graphics has a problem with lighting and display lists, as it seems to store
|
||||
// lighting state with the display list, and the display list visitor doesn't currently apply
|
||||
// state before creating display lists. So will disable the init visitor default, this won't
|
||||
// affect functionality since the display lists will be created as and when needed.
|
||||
DisplayListVisitor* dlv = new DisplayListVisitor();
|
||||
DisplayListVisitor* dlv = new DisplayListVisitor(dlvMode);
|
||||
dlv->setState(_state.get());
|
||||
dlv->setNodeMaskOverride(0xffffffff);
|
||||
_initVisitor = dlv;
|
||||
#endif
|
||||
|
||||
_updateVisitor = new UpdateVisitor;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user