diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-03-01 14:42:06 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-03-01 14:42:06 (GMT) |
commit | 8c4977361f9e7998da298b9648f3ad4be5e772ff (patch) | |
tree | bb1d13181127509265df0975ecd0c58a9d5a37f7 /src/uscxml/plugins/invoker/graphics | |
parent | c1ccbef7a59df33e6ff0c9a4609caab7e668ba77 (diff) | |
download | uscxml-8c4977361f9e7998da298b9648f3ad4be5e772ff.zip uscxml-8c4977361f9e7998da298b9648f3ad4be5e772ff.tar.gz uscxml-8c4977361f9e7998da298b9648f3ad4be5e772ff.tar.bz2 |
Fixed a bug with firlname containing the whole path
Diffstat (limited to 'src/uscxml/plugins/invoker/graphics')
-rw-r--r-- | src/uscxml/plugins/invoker/graphics/openscenegraph/OSGConverter.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGConverter.cpp b/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGConverter.cpp index 0337770..ea249e4 100644 --- a/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGConverter.cpp +++ b/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGConverter.cpp @@ -195,7 +195,14 @@ void OSGConverter::process(const SendRequest& req) { traits->height = height; traits->pbuffer = true; osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get()); - GLenum pbuffer = gc->getTraits()->doubleBuffer ? GL_BACK : GL_FRONT; + + if (!gc.valid()) { + LOG(ERROR) << "Cannot create GraphicsContext!"; + return; + } + + + GLenum pbuffer = gc->getTraits()->doubleBuffer ? GL_BACK : GL_FRONT; viewer.getCamera()->setGraphicsContext(gc.get()); viewer.getCamera()->setViewport(new osg::Viewport(0,0,traits->width,traits->height)); |