summaryrefslogtreecommitdiffstats
path: root/test/src/test-osg.cpp
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2012-12-27 21:17:45 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2012-12-27 21:17:45 (GMT)
commit7b8da7c5b88714f8b4892c83703c16b19a6cb80d (patch)
tree9f78c6399274a937c662454d51ab4314ad9ec903 /test/src/test-osg.cpp
parentfa05389f050004a14787cd7b4ebb6e0b54e0e4af (diff)
downloaduscxml-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.cpp26
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