diff --git a/examples/osgshadow/osgshadow.cpp b/examples/osgshadow/osgshadow.cpp index 2773a21b3..9551b2019 100644 --- a/examples/osgshadow/osgshadow.cpp +++ b/examples/osgshadow/osgshadow.cpp @@ -773,7 +773,7 @@ void setUpViewForDepthPartion(osgViewer::Viewer& viewer, double partitionPositio // far camera { osg::ref_ptr camera = new osg::Camera; - camera->setGraphicsContext(gc); + camera->setGraphicsContext(gc.get()); camera->setViewport(new osg::Viewport(0,0, width, height)); GLenum buffer = traits->doubleBuffer ? GL_BACK : GL_FRONT; @@ -795,7 +795,7 @@ void setUpViewForDepthPartion(osgViewer::Viewer& viewer, double partitionPositio // near camera { osg::ref_ptr camera = new osg::Camera; - camera->setGraphicsContext(gc); + camera->setGraphicsContext(gc.get()); camera->setViewport(new osg::Viewport(0,0, width, height)); GLenum buffer = traits->doubleBuffer ? GL_BACK : GL_FRONT;