1
0
Fork 0

Assume OSG version 3.0 as a minimum

This commit is contained in:
James Turner 2013-07-29 22:54:25 +01:00
parent be44fa45eb
commit 77768e2698
4 changed files with 4 additions and 15 deletions

View file

@ -1078,13 +1078,9 @@ wxRadarBg::updateFont()
} else {
tpath = path;
}
#if (FG_OSG_VERSION >= 21000)
osg::ref_ptr<osgDB::ReaderWriter::Options> fontOptions = new osgDB::ReaderWriter::Options("monochrome");
osg::ref_ptr<osgText::Font> font = osgText::readFontFile(tpath.c_str(), fontOptions.get());
#else
osg::ref_ptr<osgText::Font> font = osgText::readFontFile(tpath.c_str());
#endif
if (font != 0) {
_font = font;

View file

@ -306,10 +306,7 @@ void CameraGroup::update(const osg::Vec3d& position,
Camera* camera = info->getCamera(MAIN_CAMERA);
if ( camera ) {
const View::Slave& slave = _viewer->getSlave(info->getMainSlaveIndex());
#if SG_OSG_VERSION_LESS_THAN(3,0,0)
// refreshes camera viewports (for now)
info->updateCameras();
#endif
Matrix viewMatrix;
if (info->flags & GUI) {
viewMatrix = osg::Matrix(); // identifty transform on the GUI camera

View file

@ -16,12 +16,10 @@ namespace flightgear
public:
FGStatsHandler()
{
#if (SG_OSG_VERSION >= 30000)
// Adjust font type/size for >=OSG3.
// OSG defaults aren't working/available for FG.
_font = "Fonts/helvetica_medium.txf";
_characterSize = 12.0f;
#endif
}
};

View file

@ -597,9 +597,7 @@ void installCullVisitor(Camera* camera)
= static_cast<osgViewer::Renderer*>(camera->getRenderer());
for (int i = 0; i < 2; ++i) {
osgUtil::SceneView* sceneView = renderer->getSceneView(i);
#if SG_OSG_VERSION_LESS_THAN(3,0,0)
sceneView->setCullVisitor(new simgear::EffectCullVisitor);
#else
osg::ref_ptr<osgUtil::CullVisitor::Identifier> identifier;
identifier = sceneView->getCullVisitor()->getIdentifier();
sceneView->setCullVisitor(new simgear::EffectCullVisitor);
@ -612,7 +610,7 @@ void installCullVisitor(Camera* camera)
identifier = sceneView->getCullVisitorRight()->getIdentifier();
sceneView->setCullVisitorRight(sceneView->getCullVisitor()->clone());
sceneView->getCullVisitorRight()->setIdentifier(identifier.get());
#endif
}
}