diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2012-12-27 21:17:45 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2012-12-27 21:17:45 (GMT) |
commit | 7b8da7c5b88714f8b4892c83703c16b19a6cb80d (patch) | |
tree | 9f78c6399274a937c662454d51ab4314ad9ec903 /test/src/test-osg.cpp | |
parent | fa05389f050004a14787cd7b4ebb6e0b54e0e4af (diff) | |
download | uscxml-7b8da7c5b88714f8b4892c83703c16b19a6cb80d.zip uscxml-7b8da7c5b88714f8b4892c83703c16b19a6cb80d.tar.gz uscxml-7b8da7c5b88714f8b4892c83703c16b19a6cb80d.tar.bz2 |
New scenegraph invoker using OpenSceneGraph
Ultimately, the scenegraph invoker ought to use x3d
Diffstat (limited to 'test/src/test-osg.cpp')
-rw-r--r-- | test/src/test-osg.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/src/test-osg.cpp b/test/src/test-osg.cpp new file mode 100644 index 0000000..76199c3 --- /dev/null +++ b/test/src/test-osg.cpp @@ -0,0 +1,26 @@ +#include <osgDB/ReadFile> +#include <osgViewer/Viewer> + +#include "uscxml/concurrency/tinythread.h" + +tthread::thread* thread; +osgViewer::Viewer viewer; + +void run(void* instance) { + osg::ref_ptr<osg::Node> loadedModel = osgDB::readNodeFile("/Users/sradomski/Documents/TK/Projects/SmartVortex/Code/FE-Design/data/sv_processed/HARD_MP_VAL_000.wrl.osgb"); + viewer.setSceneData(loadedModel.get()); + +// viewer.startThreading(); + viewer.run(); +} + + +int main(int argc, char** argv) { + viewer.setThreadingModel(osgViewer::ViewerBase::SingleThreaded); + viewer.realize(); + thread = new tthread::thread(run, NULL); + while(true) { + tthread::this_thread::sleep_for(tthread::chrono::microseconds(1000)); +// viewer.eventTraversal(); + } +}
\ No newline at end of file |