]> git.mxchange.org Git - flightgear.git/commitdiff
Assume OSG version 3.0 as a minimum
authorJames Turner <zakalawe@mac.com>
Mon, 29 Jul 2013 21:54:25 +0000 (22:54 +0100)
committerJames Turner <zakalawe@mac.com>
Mon, 29 Jul 2013 21:54:25 +0000 (22:54 +0100)
src/Cockpit/wxradar.cxx
src/Viewer/CameraGroup.cxx
src/Viewer/FGEventHandler.hxx
src/Viewer/renderer.cxx

index 2d3ce04c55b60dfc5af4e9a8510efef98ac1c9cb..a5b11c9922549f029b365d185dda1fac9c28e592 100644 (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;
index 7d903a5a179b6b0505fc21f4a0a320ee76ac6af5..b09622bb7f619993c8a8b253d5d2f25d7c91e1bc 100644 (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
index 59a25381afc518704b1c4cbb0121baffbdaf17c5..934c1157f1d9eafd4a1f613b64048206b9daa890 100644 (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
             }
     };
 
index 6604ce2802a0182cc215afa40964540fe5e19c8a..2859e17deff2dc5d398193184795e1c86338aaf3 100644 (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
+
     }
 }