Browse Source

Remove optional OpenSceneGraph-Qt dependency. Fonts may not be as pretty now though

QGC4.4
Bryant Mairs 11 years ago
parent
commit
a98944a4f1
  1. 7
      QGCExternalLibs.pri
  2. 12
      src/ui/map3D/Q3DWidget.cc

7
QGCExternalLibs.pri

@ -150,13 +150,6 @@ else:MacBuild { @@ -150,13 +150,6 @@ else:MacBuild {
exists(/usr/include/osg) | exists(/usr/local/include/osg) {
message("Including support for OpenSceneGraph")
CONFIG += OSGDependency
exists(/usr/include/osg/osgQt) | exists(/usr/include/osgQt) | exists(/usr/local/include/osg/osgQt) | exists(/usr/local/include/osgQt) {
message("Including support for Linux OpenSceneGraph Qt")
LIBS += -losgQt
DEFINES += QGC_OSG_QT_ENABLED
} else {
warning("Skipping support for Linux OpenSceneGraph Qt (missing libraries, see README)")
}
} else {
warning("Skipping support for OpenSceneGraph (missing libraries, see README)")
}

12
src/ui/map3D/Q3DWidget.cc

@ -35,9 +35,6 @@ This file is part of the QGROUNDCONTROL project @@ -35,9 +35,6 @@ This file is part of the QGROUNDCONTROL project
#include <osg/Geometry>
#include <osg/LineWidth>
#include <osg/MatrixTransform>
#ifdef QGC_OSG_QT_ENABLED
#include <osgQt/QFontImplementation>
#endif
#ifdef Q_OS_MACX
#include <Carbon/Carbon.h>
#endif
@ -50,14 +47,7 @@ Q3DWidget::Q3DWidget(QWidget* parent) @@ -50,14 +47,7 @@ Q3DWidget::Q3DWidget(QWidget* parent)
, mHudProjectionMatrix(new osg::Projection)
, mFps(30.0f)
{
#ifdef QGC_OSG_QT_ENABLED
osg::ref_ptr<osgText::Font::FontImplementation> fontImpl;
fontImpl = new osgQt::QFontImplementation(QFont(":/general/vera.ttf"));
#else
osg::ref_ptr<osgText::Font::FontImplementation> fontImpl;
fontImpl = 0;//new osgText::Font::Font("files/styles/Vera.ttf");
#endif
mFont = new osgText::Font(fontImpl);
mFont = NULL;
mOsgGW = new osgViewer::GraphicsWindowEmbedded(0, 0, width(), height());

Loading…
Cancel
Save