diff --git a/examples/osgAndroidExampleGLES2/jni/OsgMainApp.cpp b/examples/osgAndroidExampleGLES2/jni/OsgMainApp.cpp index 8d11fb14d..628e15588 100644 --- a/examples/osgAndroidExampleGLES2/jni/OsgMainApp.cpp +++ b/examples/osgAndroidExampleGLES2/jni/OsgMainApp.cpp @@ -103,7 +103,9 @@ void OsgMainApp::initOsgWindow(int x,int y,int width,int height){ osg::notify(osg::ALWAYS)<<"Testing"<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();