Browse Source

Re-enabled OSG support for Mac OS, for the 32bit build (64bit does not support Google Earth) the local 3D map is now enabled per default

QGC4.4
LM 14 years ago
parent
commit
49566ca120
  1. BIN
      lib/mac32-gcc40/lib/libOpenThreads.dylib
  2. BIN
      lib/mac32-gcc40/lib/libosg.dylib
  3. BIN
      lib/mac32-gcc40/lib/libosgAnimation.dylib
  4. BIN
      lib/mac32-gcc40/lib/libosgDB.dylib
  5. BIN
      lib/mac32-gcc40/lib/libosgFX.dylib
  6. BIN
      lib/mac32-gcc40/lib/libosgGA.dylib
  7. BIN
      lib/mac32-gcc40/lib/libosgManipulator.dylib
  8. BIN
      lib/mac32-gcc40/lib/libosgParticle.dylib
  9. BIN
      lib/mac32-gcc40/lib/libosgPresentation.dylib
  10. BIN
      lib/mac32-gcc40/lib/libosgShadow.dylib
  11. BIN
      lib/mac32-gcc40/lib/libosgSim.dylib
  12. BIN
      lib/mac32-gcc40/lib/libosgTerrain.dylib
  13. BIN
      lib/mac32-gcc40/lib/libosgText.dylib
  14. BIN
      lib/mac32-gcc40/lib/libosgUtil.dylib
  15. BIN
      lib/mac32-gcc40/lib/libosgViewer.dylib
  16. BIN
      lib/mac32-gcc40/lib/libosgVolume.dylib
  17. BIN
      lib/mac32-gcc40/lib/libosgWidget.dylib
  18. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_3dc.so
  19. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_3ds.so
  20. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_QTKit.so
  21. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_ac.so
  22. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_bmp.so
  23. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_bsp.so
  24. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_bvh.so
  25. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_cfg.so
  26. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_curl.so
  27. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_dds.so
  28. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osg.so
  29. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osganimation.so
  30. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osgfx.so
  31. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osgparticle.so
  32. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osgshadow.so
  33. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osgsim.so
  34. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osgterrain.so
  35. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osgtext.so
  36. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osgviewer.so
  37. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osgvolume.so
  38. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osgwidget.so
  39. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_dicom.so
  40. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_dot.so
  41. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_dw.so
  42. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_dxf.so
  43. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_freetype.so
  44. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_geo.so
  45. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_glsl.so
  46. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_gz.so
  47. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_hdr.so
  48. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_imageio.so
  49. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_ive.so
  50. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_logo.so
  51. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_lwo.so
  52. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_lws.so
  53. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_md2.so
  54. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_mdl.so
  55. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_normals.so
  56. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_obj.so
  57. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_openflight.so
  58. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_osg.so
  59. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_osga.so
  60. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_osgshadow.so
  61. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_osgterrain.so
  62. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_osgtgz.so
  63. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_osgviewer.so
  64. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_p3d.so
  65. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_pic.so
  66. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_ply.so
  67. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_pnm.so
  68. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_pov.so
  69. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_pvr.so
  70. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_qt.so
  71. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_revisions.so
  72. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_rgb.so
  73. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_rot.so
  74. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_scale.so
  75. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_serializers_osg.so
  76. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_serializers_osganimation.so
  77. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_serializers_osgfx.so
  78. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_serializers_osgmanipulator.so
  79. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_serializers_osgparticle.so
  80. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_serializers_osgshadow.so
  81. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_serializers_osgsim.so
  82. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_serializers_osgterrain.so
  83. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_serializers_osgtext.so
  84. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_serializers_osgvolume.so
  85. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_shp.so
  86. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_stl.so
  87. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_tga.so
  88. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_tgz.so
  89. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_trans.so
  90. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_txf.so
  91. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_txp.so
  92. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_vtf.so
  93. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_x.so
  94. BIN
      lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_zip.so
  95. 47
      qgroundcontrol.pri
  96. 8
      qgroundcontrol.pro
  97. 3
      src/ui/map3D/PixhawkCheetahGeode.cc
  98. 289
      src/ui/map3D/QOSGWidget.cc
  99. 197
      src/ui/map3D/QOSGWidget.h

BIN
lib/mac32-gcc40/lib/libOpenThreads.dylib

Binary file not shown.

BIN
lib/mac32-gcc40/lib/libosg.dylib

Binary file not shown.

BIN
lib/mac32-gcc40/lib/libosgAnimation.dylib

Binary file not shown.

BIN
lib/mac32-gcc40/lib/libosgDB.dylib

Binary file not shown.

BIN
lib/mac32-gcc40/lib/libosgFX.dylib

Binary file not shown.

BIN
lib/mac32-gcc40/lib/libosgGA.dylib

Binary file not shown.

BIN
lib/mac32-gcc40/lib/libosgManipulator.dylib

Binary file not shown.

BIN
lib/mac32-gcc40/lib/libosgParticle.dylib

Binary file not shown.

BIN
lib/mac32-gcc40/lib/libosgPresentation.dylib

Binary file not shown.

BIN
lib/mac32-gcc40/lib/libosgShadow.dylib

Binary file not shown.

BIN
lib/mac32-gcc40/lib/libosgSim.dylib

Binary file not shown.

BIN
lib/mac32-gcc40/lib/libosgTerrain.dylib

Binary file not shown.

BIN
lib/mac32-gcc40/lib/libosgText.dylib

Binary file not shown.

BIN
lib/mac32-gcc40/lib/libosgUtil.dylib

Binary file not shown.

BIN
lib/mac32-gcc40/lib/libosgViewer.dylib

Binary file not shown.

BIN
lib/mac32-gcc40/lib/libosgVolume.dylib

Binary file not shown.

BIN
lib/mac32-gcc40/lib/libosgWidget.dylib

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_3dc.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_3ds.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_QTKit.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_ac.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_bmp.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_bsp.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_bvh.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_cfg.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_curl.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_dds.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osg.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osganimation.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osgfx.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osgparticle.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osgshadow.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osgsim.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osgterrain.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osgtext.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osgviewer.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osgvolume.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_deprecated_osgwidget.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_dicom.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_dot.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_dw.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_dxf.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_freetype.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_geo.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_glsl.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_gz.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_hdr.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_imageio.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_ive.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_logo.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_lwo.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_lws.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_md2.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_mdl.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_normals.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_obj.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_openflight.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_osg.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_osga.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_osgshadow.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_osgterrain.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_osgtgz.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_osgviewer.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_p3d.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_pic.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_ply.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_pnm.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_pov.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_pvr.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_qt.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_revisions.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_rgb.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_rot.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_scale.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_serializers_osg.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_serializers_osganimation.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_serializers_osgfx.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_serializers_osgmanipulator.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_serializers_osgparticle.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_serializers_osgshadow.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_serializers_osgsim.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_serializers_osgterrain.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_serializers_osgtext.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_serializers_osgvolume.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_shp.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_stl.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_tga.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_tgz.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_trans.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_txf.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_txp.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_vtf.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_x.so

Binary file not shown.

BIN
lib/mac32-gcc40/lib/osgPlugins-3.0.1/osgdb_zip.so

Binary file not shown.

47
qgroundcontrol.pri

@ -92,10 +92,12 @@ macx { @@ -92,10 +92,12 @@ macx {
QMAKE_POST_LINK += && cp -f $$BASEDIR/images/style-outdoor.css $$TARGETDIR/qgroundcontrol.app/Contents/MacOS
# Copy parameter tooltip files
QMAKE_POST_LINK += && cp -rf $$BASEDIR/files $$TARGETDIR/qgroundcontrol.app/Contents/MacOS
# Copy libraries
QMAKE_POST_LINK += && cp -rf $$BASEDIR/lib/mac32-gcc40/lib/* $$TARGETDIR/qgroundcontrol.app/Contents/MacOS
# Copy model files
#QMAKE_POST_LINK += && cp -f $$BASEDIR/models/*.dae $$TARGETDIR/qgroundcontrol.app/Contents/MacOs
exists(/Library/Frameworks/osg.framework):exists(/Library/Frameworks/OpenThreads.framework) {
#exists(/Library/Frameworks/osg.framework):exists(/Library/Frameworks/OpenThreads.framework) {
# No check for GLUT.framework since it's a MAC default
message("Building support for OpenSceneGraph")
DEPENDENCIES_PRESENT += osg
@ -103,24 +105,19 @@ macx { @@ -103,24 +105,19 @@ macx {
# Include OpenSceneGraph libraries
INCLUDEPATH += -framework GLUT \
-framework Cocoa \
-framework OpenThreads \
-framework osg \
-framework osgViewer \
-framework osgGA \
-framework osgDB \
-framework osgText \
-framework osgWidget
$$BASEDIR/lib/mac32-gcc40/include
LIBS += -framework GLUT \
-framework Cocoa \
-framework OpenThreads \
-framework osg \
-framework osgViewer \
-framework osgGA \
-framework osgDB \
-framework osgText \
-framework osgWidget
}
-L$$BASEDIR/lib/mac32-gcc40/lib \
-lOpenThreads \
-losg \
-losgViewer \
-losgGA \
-losgDB \
-losgText \
-losgWidget
#}
exists(/opt/local/include/libfreenect)|exists(/usr/local/include/libfreenect) {
message("Building support for libfreenect")
@ -180,15 +177,6 @@ message("Compiling for linux 32") @@ -180,15 +177,6 @@ message("Compiling for linux 32")
DEFINES += QGC_OSG_ENABLED
}
exists(/usr/include/osgEarth):exists(/usr/include/osg) | exists(/usr/local/include/osgEarth):exists(/usr/include/osg) {
message("Building support for osgEarth")
DEPENDENCIES_PRESENT += osgearth
# Include osgEarth libraries
LIBS += -losgEarth \
-losgEarthUtil
DEFINES += QGC_OSGEARTH_ENABLED
}
exists(/usr/local/include/libfreenect/libfreenect.h) {
message("Building support for libfreenect")
DEPENDENCIES_PRESENT += libfreenect
@ -257,15 +245,6 @@ linux-g++-64 { @@ -257,15 +245,6 @@ linux-g++-64 {
DEFINES += QGC_OSG_ENABLED
}
exists(/usr/include/osgEarth) {
message("Building support for osgEarth")
DEPENDENCIES_PRESENT += osgearth
# Include osgEarth libraries
LIBS += -losgEarth \
-losgEarthUtil
DEFINES += QGC_OSGEARTH_ENABLED
}
exists(/usr/local/include/libfreenect) {
message("Building support for libfreenect")
DEPENDENCIES_PRESENT += libfreenect

8
qgroundcontrol.pro

@ -361,7 +361,6 @@ contains(DEPENDENCIES_PRESENT, osg) { @@ -361,7 +361,6 @@ contains(DEPENDENCIES_PRESENT, osg) {
HEADERS += src/ui/map3D/Q3DWidget.h \
src/ui/map3D/GCManipulator.h \
src/ui/map3D/ImageWindowGeode.h \
src/ui/map3D/QOSGWidget.h \
src/ui/map3D/PixhawkCheetahGeode.h \
src/ui/map3D/Pixhawk3DWidget.h \
src/ui/map3D/Q3DWidgetFactory.h \
@ -372,12 +371,6 @@ contains(DEPENDENCIES_PRESENT, osg) { @@ -372,12 +371,6 @@ contains(DEPENDENCIES_PRESENT, osg) {
src/ui/map3D/Imagery.h \
src/ui/map3D/HUDScaleGeode.h \
src/ui/map3D/WaypointGroupNode.h
contains(DEPENDENCIES_PRESENT, osgearth) {
message("Including headers for OSGEARTH")
# Enable only if OpenSceneGraph is available
HEADERS += src/ui/map3D/QMap3D.h
}
}
contains(DEPENDENCIES_PRESENT, libfreenect) {
message("Including headers for libfreenect")
@ -491,7 +484,6 @@ contains(DEPENDENCIES_PRESENT, osg) { @@ -491,7 +484,6 @@ contains(DEPENDENCIES_PRESENT, osg) {
SOURCES += src/ui/map3D/Q3DWidget.cc \
src/ui/map3D/ImageWindowGeode.cc \
src/ui/map3D/GCManipulator.cc \
src/ui/map3D/QOSGWidget.cc \
src/ui/map3D/PixhawkCheetahGeode.cc \
src/ui/map3D/Pixhawk3DWidget.cc \
src/ui/map3D/Q3DWidgetFactory.cc \

3
src/ui/map3D/PixhawkCheetahGeode.cc

@ -30,9 +30,8 @@ This file is part of the QGROUNDCONTROL project @@ -30,9 +30,8 @@ This file is part of the QGROUNDCONTROL project
*
*/
#include "PixhawkCheetahGeode.h"
#include <osg/Geometry>
#include "PixhawkCheetahGeode.h"
struct sample_MATERIAL {
GLfloat ambient[3];

289
src/ui/map3D/QOSGWidget.cc

@ -1,289 +0,0 @@ @@ -1,289 +0,0 @@
/* OpenSceneGraph example, osganimate.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "QOSGWidget.h"
#ifdef Q_OS_MACX
#endif
QOSGWidget::QOSGWidget( QWidget * parent, const char * name, WindowFlags f, bool overrideTraits):
QWidget(parent, f), _overrideTraits (overrideTraits)
{
createContext();
Q_UNUSED(name);
setAttribute(Qt::WA_PaintOnScreen);
setAttribute(Qt::WA_NoSystemBackground);
setFocusPolicy(Qt::ClickFocus);
}
void QOSGWidget::createContext()
{
osg::DisplaySettings* ds = osg::DisplaySettings::instance();
osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits;
traits->readDISPLAY();
if (traits->displayNum<0) traits->displayNum = 0;
traits->windowName = "osgViewerQt";
traits->screenNum = 0;
traits->x = x();
traits->y = y();
traits->width = width();
traits->height = height();
traits->alpha = ds->getMinimumNumAlphaBits();
traits->stencil = ds->getMinimumNumStencilBits();
traits->windowDecoration = false;
traits->doubleBuffer = true;
traits->sharedContext = 0;
traits->sampleBuffers = ds->getMultiSamples();
traits->samples = ds->getNumMultiSamples();
#if defined(__APPLE__)
// Extract a WindowPtr from the HIViewRef that QWidget::winId() returns.
// Without this change, the peer tries to call GetWindowPort on the HIViewRef
// which returns 0 and we only render white.
traits->inheritedWindowData = new WindowData(HIViewGetWindow((HIViewRef)winId()));
#else // all others
traits->inheritedWindowData = new WindowData(winId());
#endif
if (ds->getStereo()) {
switch(ds->getStereoMode()) {
case(osg::DisplaySettings::QUAD_BUFFER):
traits->quadBufferStereo = true;
break;
case(osg::DisplaySettings::VERTICAL_INTERLACE):
case(osg::DisplaySettings::CHECKERBOARD):
case(osg::DisplaySettings::HORIZONTAL_INTERLACE):
traits->stencil = 8;
break;
default:
break;
}
}
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
_gw = dynamic_cast<osgViewer::GraphicsWindow*>(gc.get());
// get around dearanged traits on X11 (MTCompositeViewer only)
if (_overrideTraits) {
traits->x = x();
traits->y = y();
traits->width = width();
traits->height = height();
}
}
#ifndef WIN32
void QOSGWidget::destroyEvent(bool destroyWindow, bool destroySubWindows)
{
Q_UNUSED(destroyWindow);
Q_UNUSED(destroySubWindows);
_gw->getEventQueue()->closeWindow();
}
void QOSGWidget::closeEvent( QCloseEvent * event )
{
event->accept();
_gw->getEventQueue()->closeWindow();
}
void QOSGWidget::resizeEvent( QResizeEvent * event )
{
const QSize & size = event->size();
_gw->getEventQueue()->windowResize(0, 0, size.width(), size.height() );
_gw->resized(0, 0, size.width(), size.height());
}
void QOSGWidget::keyPressEvent( QKeyEvent* event )
{
_gw->getEventQueue()->keyPress( (osgGA::GUIEventAdapter::KeySymbol) *(event->text().toAscii().data() ) );
}
void QOSGWidget::keyReleaseEvent( QKeyEvent* event )
{
int c = *event->text().toAscii().data();
_gw->getEventQueue()->keyRelease( (osgGA::GUIEventAdapter::KeySymbol) (c) );
}
void QOSGWidget::mousePressEvent( QMouseEvent* event )
{
int button = 0;
switch(event->button()) {
case(Qt::LeftButton):
button = 1;
break;
case(Qt::MidButton):
button = 2;
break;
case(Qt::RightButton):
button = 3;
break;
case(Qt::NoButton):
button = 0;
break;
default:
button = 0;
break;
}
_gw->getEventQueue()->mouseButtonPress(event->x(), event->y(), button);
}
void QOSGWidget::mouseDoubleClickEvent ( QMouseEvent * event )
{
int button = 0;
switch(event->button()) {
case(Qt::LeftButton):
button = 1;
break;
case(Qt::MidButton):
button = 2;
break;
case(Qt::RightButton):
button = 3;
break;
case(Qt::NoButton):
button = 0;
break;
default:
button = 0;
break;
}
_gw->getEventQueue()->mouseDoubleButtonPress(event->x(), event->y(), button);
}
void QOSGWidget::mouseReleaseEvent( QMouseEvent* event )
{
int button = 0;
switch(event->button()) {
case(Qt::LeftButton):
button = 1;
break;
case(Qt::MidButton):
button = 2;
break;
case(Qt::RightButton):
button = 3;
break;
case(Qt::NoButton):
button = 0;
break;
default:
button = 0;
break;
}
_gw->getEventQueue()->mouseButtonRelease(event->x(), event->y(), button);
}
void QOSGWidget::mouseMoveEvent( QMouseEvent* event )
{
_gw->getEventQueue()->mouseMotion(event->x(), event->y());
}
#endif
void CompositeViewerQOSG::Tile()
{
int n = getNumViews() - 1; // -1 to account for dummy view
for ( int i = 0; i < n; ++i ) {
osgViewer::View * view = getView(i+1); // +1 to account for dummy view
view->getCamera()->setViewport( new osg::Viewport( 0, i*height()/n , width(), height()/n ) );
view->getCamera()->setProjectionMatrixAsPerspective( 30.0f, double( width() ) / double( height()/n ), 1.0f, 10000.0f );
}
}
void CompositeViewerQOSG::AddView( osg::Node * scene )
{
osgViewer::View* view = new osgViewer::View;
addView(view);
view->setSceneData( scene );
view->setCameraManipulator(new osgGA::TrackballManipulator);
// add the state manipulator
osg::ref_ptr<osgGA::StateSetManipulator> statesetManipulator = new osgGA::StateSetManipulator;
statesetManipulator->setStateSet(view->getCamera()->getOrCreateStateSet());
view->getCamera()->setGraphicsContext( getGraphicsWindow() );
view->getCamera()->setClearColor( osg::Vec4( 0.08, 0.08, 0.5, 1.0 ) );
Tile();
}
void CompositeViewerQOSG::RemoveView()
{
if ( getNumViews() > 1 ) {
removeView( getView( getNumViews() - 1 ) );
}
Tile();
}
// we use this wrapper for CompositeViewer ONLY because of the timer
// NOTE: this is a workaround because we're not using QT's moc precompiler here.
//
class QViewerTimer : public QWidget
{
public:
QViewerTimer (int fps = 20, QWidget * parent = 0, WindowFlags f = 0):
QWidget (parent, f) {
_viewer = new osgViewer::CompositeViewer ();
_viewer->setThreadingModel(osgViewer::CompositeViewer::DrawThreadPerContext);
connect(&_timer, SIGNAL(timeout()), this, SLOT(repaint()));
_timer.start(1000.0f/fps);
}
~QViewerTimer () {
_timer.stop ();
}
virtual void paintEvent (QPaintEvent * event) {
Q_UNUSED(event);
_viewer->frame();
}
osg::ref_ptr <osgViewer::CompositeViewer> _viewer;
QTimer _timer;
};
void setupHandlers(osgViewer::View * viewer)
{
// add the state manipulator
viewer->addEventHandler( new osgGA::StateSetManipulator(viewer->getCamera()->getOrCreateStateSet()) );
// add the thread model handler
viewer->addEventHandler(new osgViewer::ThreadingHandler);
// add the window size toggle handler
viewer->addEventHandler(new osgViewer::WindowSizeHandler);
// add the stats handler
viewer->addEventHandler(new osgViewer::StatsHandler);
}

197
src/ui/map3D/QOSGWidget.h

@ -1,197 +0,0 @@ @@ -1,197 +0,0 @@
/* OpenSceneGraph example, osganimate.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include <osg/Config>
#if defined(_MSC_VER) && defined(OSG_DISABLE_MSVC_WARNINGS)
// disable warning "'QtConcurrent::BlockSizeManager' : assignment operator could not be generated"
#pragma warning( disable : 4512 )
#endif
#include <QtCore/QString>
#include <QtCore/QTimer>
#include <QtGui/QKeyEvent>
#include <QtGui/QApplication>
#include <QtGui/QtGui>
#include <QtGui/QWidget>
using Qt::WindowFlags;
#include <osgViewer/Viewer>
#include <osgViewer/CompositeViewer>
#include <osgViewer/ViewerEventHandlers>
#include <osgViewer/GraphicsWindow>
#include <osgViewer/ViewerEventHandlers>
#if defined(WIN32) && !defined(__CYGWIN__)
#include <osgViewer/api/Win32/GraphicsWindowWin32>
typedef HWND WindowHandle;
typedef osgViewer::GraphicsWindowWin32::WindowData WindowData;
#elif defined(__APPLE__) // Assume using Carbon on Mac.
#include <osgViewer/api/Carbon/GraphicsWindowCarbon>
typedef WindowRef WindowHandle;
typedef osgViewer::GraphicsWindowCarbon::WindowData WindowData;
#else // all other unix
#include <osgViewer/api/X11/GraphicsWindowX11>
typedef Window WindowHandle;
typedef osgViewer::GraphicsWindowX11::WindowData WindowData;
#endif
#include <osgGA/TrackballManipulator>
#include <osgGA/FlightManipulator>
#include <osgGA/DriveManipulator>
#include <osgGA/KeySwitchMatrixManipulator>
#include <osgGA/StateSetManipulator>
#include <osgGA/AnimationPathManipulator>
#include <osgGA/TerrainManipulator>
#include <osgDB/ReadFile>
#include <iostream>
#include <sstream>
#ifndef QOSGWIDGET_H
#define QOSGWIDGET_H
class QOSGWidget : public QWidget
{
public:
QOSGWidget( QWidget * parent = 0, const char * name = 0, WindowFlags f = 0, bool overrideTraits = false);
virtual ~QOSGWidget() {}
osgViewer::GraphicsWindow* getGraphicsWindow() {
return _gw.get();
}
const osgViewer::GraphicsWindow* getGraphicsWindow() const {
return _gw.get();
}
protected:
void init();
void createContext();
// The GraphincsWindowWin32 implementation already takes care of message handling.
// We don't want to relay these on Windows, it will just cause duplicate messages
// with further problems downstream (i.e. not being able to throw the trackball
#ifndef WIN32
virtual void mouseDoubleClickEvent ( QMouseEvent * event );
virtual void closeEvent( QCloseEvent * event );
virtual void destroyEvent( bool destroyWindow = true, bool destroySubWindows = true);
virtual void resizeEvent( QResizeEvent * event );
virtual void keyPressEvent( QKeyEvent* event );
virtual void keyReleaseEvent( QKeyEvent* event );
virtual void mousePressEvent( QMouseEvent* event );
virtual void mouseReleaseEvent( QMouseEvent* event );
virtual void mouseMoveEvent( QMouseEvent* event );
#endif
osg::ref_ptr<osgViewer::GraphicsWindow> _gw;
bool _overrideTraits;
};
class ViewerQOSG : public osgViewer::Viewer, public QOSGWidget
{
public:
ViewerQOSG(QWidget * parent = 0, const char * name = 0, WindowFlags f = 0, int fps = 20):
QOSGWidget( parent, name, f ) {
setThreadingModel(osgViewer::Viewer::SingleThreaded);
connect(&_timer, SIGNAL(timeout()), this, SLOT(update()));
_timer.start(1000.0f/fps);
}
void updateCamera() {
getCamera()->setViewport(new osg::Viewport(0,0,width(),height()));
getCamera()->setProjectionMatrixAsPerspective(30.0f, 1.0f , static_cast<double>(width())/static_cast<double>(height()), 10000.0f);
getCamera()->setGraphicsContext(getGraphicsWindow());
}
virtual void paintEvent( QPaintEvent * event ) {
Q_UNUSED(event);
frame();
}
protected:
QTimer _timer;
};
class CompositeViewerQOSG : public osgViewer::CompositeViewer, public QOSGWidget
{
public:
CompositeViewerQOSG(QWidget * parent = 0, const char * name = 0, WindowFlags f = 0, int fps = 20)
: QOSGWidget( parent, name, f ) {
setThreadingModel(osgViewer::CompositeViewer::SingleThreaded);
connect(&_timer, SIGNAL(timeout()), this, SLOT(repaint()));
// The composite viewer needs at least one view to work
// Create a dummy view with a zero sized viewport and no
// scene to keep the viewer alive.
osgViewer::View * pView = new osgViewer::View;
pView->getCamera()->setGraphicsContext( getGraphicsWindow() );
pView->getCamera()->setViewport( 0, 0, 0, 0 );
addView( pView );
// Clear the viewer of removed views
getGraphicsWindow()->setClearMask( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
getGraphicsWindow()->setClearColor( osg::Vec4( 0.08, 0.08, 0.5, 1.0 ) );
// The app would hang on exit when using start(1). Behaves better with 10
// like the non-composite viewer. Was this just a typo?
_timer.start(1000.0f/fps);
}
virtual void paintEvent( QPaintEvent * event ) {
Q_UNUSED(event);
frame();
}
void keyPressEvent( QKeyEvent* event ) {
if ( event->text() == "a" ) {
AddView( _scene.get() );
}
if ( event->text() == "r" ) {
RemoveView();
}
QOSGWidget::keyPressEvent( event );
}
void AddView( osg::Node * scene );
void RemoveView();
void Tile();
osg::ref_ptr< osg::Node > _scene;
protected:
QTimer _timer;
};
void setupHandlers(osgViewer::View * viewer);
#endif // QOSGWIDGET_H
Loading…
Cancel
Save