} 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;
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
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
}
};
= 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);
identifier = sceneView->getCullVisitorRight()->getIdentifier();
sceneView->setCullVisitorRight(sceneView->getCullVisitor()->clone());
sceneView->getCullVisitorRight()->setIdentifier(identifier.get());
-#endif
+
}
}