Merge pull request #887 from limbolily/patch-1

Fix navagation error about Android GLES2 example.
This commit is contained in:
OpenSceneGraph git repository 2020-01-06 10:27:18 +00:00 committed by GitHub
commit 8551f25da0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,7 +103,9 @@ void OsgMainApp::initOsgWindow(int x,int y,int width,int height){
osg::notify(osg::ALWAYS)<<"Testing"<<std::endl;
_viewer = new osgViewer::Viewer();
_viewer->setUpViewerAsEmbeddedInWindow(x, y, width, height);
osgViewer::GraphicsWindowEmbedded* window = _viewer->setUpViewerAsEmbeddedInWindow(x, y, width, height);
_viewer->getEventQueue()->setGraphicsContext(window);
_viewer->getEventQueue()->syncWindowRectangleWithGraphicsContext();
_viewer->setThreadingModel(osgViewer::ViewerBase::SingleThreaded);
_root = new osg::Group();