Modified Files:
src/Model/panelnode.cxx src/Model/panelnode.hxx: Make it compile also with osg HEAD.
This commit is contained in:
parent
826866b327
commit
99cb08ef87
2 changed files with 11 additions and 9 deletions
|
@ -130,12 +130,14 @@ FGPanelNode::drawImplementation(osg::State& state) const
|
||||||
// coordinates to panel coordinates when the user clicks the
|
// coordinates to panel coordinates when the user clicks the
|
||||||
// mouse.
|
// mouse.
|
||||||
// OSGFIXME: we don't need that when we can really pick
|
// OSGFIXME: we don't need that when we can really pick
|
||||||
const_cast<osg::Matrix&>(_lastModelview) = state.getModelViewMatrix();
|
_lastModelview = state.getModelViewMatrix();
|
||||||
const_cast<osg::Matrix&>(_lastProjection) = state.getProjectionMatrix();
|
_lastProjection = state.getProjectionMatrix();
|
||||||
state.getCurrentViewport()->getViewport(const_cast<int&>(_lastViewport[0]),
|
|
||||||
const_cast<int&>(_lastViewport[1]),
|
const osg::Viewport* vp = state.getCurrentViewport();
|
||||||
const_cast<int&>(_lastViewport[2]),
|
_lastViewport[0] = vp->x();
|
||||||
const_cast<int&>(_lastViewport[3]));
|
_lastViewport[1] = vp->y();
|
||||||
|
_lastViewport[2] = vp->width();
|
||||||
|
_lastViewport[3] = vp->height();
|
||||||
|
|
||||||
_panel->draw(state);
|
_panel->draw(state);
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,9 +53,9 @@ private:
|
||||||
// The matrix transformation state that was active the last time
|
// The matrix transformation state that was active the last time
|
||||||
// we were rendered. Used by the mouse code to compute
|
// we were rendered. Used by the mouse code to compute
|
||||||
// intersections.
|
// intersections.
|
||||||
osg::Matrix _lastModelview;
|
mutable osg::Matrix _lastModelview;
|
||||||
osg::Matrix _lastProjection;
|
mutable osg::Matrix _lastProjection;
|
||||||
int _lastViewport[4];
|
mutable double _lastViewport[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue