diff --git a/examples/osgshadow/osgshadow.cpp b/examples/osgshadow/osgshadow.cpp index 27e3fba72..a91e8a13b 100644 --- a/examples/osgshadow/osgshadow.cpp +++ b/examples/osgshadow/osgshadow.cpp @@ -603,7 +603,7 @@ struct MyUpdateSlaveCallback : public osg::View::Slave::UpdateSlaveCallback void setUpViewForDepthPartion(osgViewer::Viewer& viewer, double partitionPosition) { - OSG_NOTICE<<"setUpViewForDepthPartion(Viewer, "<setGraphicsContext(gc); - camera->setViewport(new osg::Viewport(0,0, width, height)); - GLenum buffer = traits->doubleBuffer ? GL_BACK : GL_FRONT; - camera->setDrawBuffer(buffer); - camera->setReadBuffer(buffer); - -#else - double zNear = 0.5; - double zMid = 10.0; + double zMid = partitionPosition; double zFar = 200.0; - // far camera { osg::ref_ptr camera = new osg::Camera; @@ -705,10 +692,6 @@ void setUpViewForDepthPartion(osgViewer::Viewer& viewer, double partitionPositio osg::View::Slave& slave = viewer.getSlave(viewer.getNumSlaves()-1); slave._updateSlaveCallback = new MyUpdateSlaveCallback(zNear, zMid); } - - -#endif - } @@ -770,7 +753,7 @@ int main(int argc, char** argv) return 1; } - double partitionPosition = 0.1; + double partitionPosition = 5.0; if (arguments.read("--depth-partition",partitionPosition) || arguments.read("--dp")) { setUpViewForDepthPartion(viewer,partitionPosition);