+ osg::ref_ptr<osg::RefMatrix> mv = new osg::RefMatrix;
+ mv->set(_xform*state.getModelViewMatrix());
+ state.applyModelViewMatrix(mv.get());
+
+ // Grab the matrix state, so that we can get back from screen
+ // coordinates to panel coordinates when the user clicks the
+ // mouse.
+ // OSGFIXME: we don't need that when we can really pick
+ _lastModelview = state.getModelViewMatrix();
+ _lastProjection = state.getProjectionMatrix();
+
+ const osg::Viewport* vp = state.getCurrentViewport();
+ _lastViewport[0] = vp->x();
+ _lastViewport[1] = vp->y();
+ _lastViewport[2] = vp->width();
+ _lastViewport[3] = vp->height();
+
+ _panel->draw(state);