Revision aeb73a09 src/spin/spinViewer.cpp
| b/src/spin/spinViewer.cpp | ||
|---|---|---|
| 58 | 58 |
|
| 59 | 59 |
#include <boost/algorithm/string.hpp> |
| 60 | 60 |
|
| 61 |
#include "config.h" |
|
| 61 | 62 |
#include "ViewerManipulator.h" |
| 62 | 63 |
#include "spinUtil.h" |
| 63 | 64 |
#include "spinApp.h" |
| ... | ... | |
| 66 | 67 |
#include "GroupNode.h" |
| 67 | 68 |
#include "SceneManager.h" |
| 68 | 69 |
#include "ShapeNode.h" |
| 69 |
#include "config.h" |
|
| 70 |
|
|
| 70 | 71 |
|
| 71 | 72 |
extern pthread_mutex_t sceneMutex; |
| 72 | 73 |
|
| ... | ... | |
| 879 | 880 |
std::string camConfig; |
| 880 | 881 |
std::string sceneID = spin.getSceneID(); |
| 881 | 882 |
|
| 883 |
//osg::setNotifyLevel(osg::INFO); |
|
| 884 |
|
|
| 882 | 885 |
// ************************************************************************* |
| 883 | 886 |
|
| 884 | 887 |
// get arguments: |
| ... | ... | |
| 936 | 939 |
|
| 937 | 940 |
|
| 938 | 941 |
// For testing purposes, we allow loading a scene with a commandline arg: |
| 939 |
osg::setNotifyLevel(osg::DEBUG_FP); |
|
| 940 | 942 |
//std::cout << "DYLD_LIBRARY_PATH= " << getenv("DYLD_LIBRARY_PATH") << std::endl;
|
| 941 | 943 |
//std::cout << "OSG_LIBRARY_PATH= " << getenv("OSG_LIBRARY_PATH") << std::endl;
|
| 942 | 944 |
//setenv("OSG_PLUGIN_EXTENSION", ".so", 1);
|
| 943 | 945 |
osg::ref_ptr<osg::Node> argScene = osgDB::readNodeFiles(arguments); |
| 944 | 946 |
|
| 945 |
osg::setNotifyLevel(osg::FATAL); |
|
| 946 | 947 |
|
| 947 | 948 |
// ************************************************************************* |
| 948 | 949 |
// construct the viewer: |
| 949 | 950 |
// (note, this constructor gets rid of some additional args) |
| 950 | 951 |
|
| 951 | 952 |
osgViewer::CompositeViewer viewer = osgViewer::CompositeViewer(arguments); |
| 952 |
// Aug 19 2010:tmatth: Tried this for multithreading |
|
| 953 |
//viewer.setThreadingModel(osgViewer::CompositeViewer::AutomaticSelection); |
|
| 954 |
//viewer.setThreadingModel(osgViewer::CompositeViewer::SingleThreaded); |
|
| 955 |
viewer.setThreadingModel(osgViewer::CompositeViewer::CullDrawThreadPerContext); |
|
| 953 |
//viewer.setThreadingModel(osgViewer::CompositeViewer::AutomaticSelection); |
|
| 954 |
viewer.setThreadingModel(osgViewer::CompositeViewer::SingleThreaded); |
|
| 955 |
//viewer.setThreadingModel(osgViewer::CompositeViewer::CullDrawThreadPerContext); |
|
| 956 | 956 |
|
| 957 | 957 |
viewer.getUsage(*arguments.getApplicationUsage()); |
| 958 | 958 |
|
| ... | ... | |
| 1053 | 1053 |
//} |
| 1054 | 1054 |
} |
| 1055 | 1055 |
|
| 1056 |
/// Thu Aug 19 2010:tmatth:FIXME: this segfaults in multithreaded mode |
|
| 1057 |
view->setSceneData(spin.sceneManager->worldNode.get()); |
|
| 1056 |
view->setSceneData(spin.sceneManager->rootNode.get()); |
|
| 1058 | 1057 |
|
| 1059 | 1058 |
view->addEventHandler(new osgViewer::StatsHandler); |
| 1060 | 1059 |
view->addEventHandler(new osgViewer::ThreadingHandler); |
Also available in: Unified diff