Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. #include <osgDB/ReadFile>
  2. #include <osgViewer/Viewer>
  3. #include <ogrsf_frmts.h>
  4.  
  5. int main(int argc, char *argv[]) {
  6. // OGRPoint p; //breakpoint 1
  7. osg::ref_ptr<osg::Node> root = osgDB::readNodeFile("../resourses/cessna.osg"); //breakpoint 2
  8. osgViewer::Viewer viewer;
  9. viewer.setSceneData(root.get());
  10.  
  11. return viewer.run();
  12. }
  13.  
  14. TEMPLATE = app
  15. TARGET = hello
  16. QT -= gui
  17. CONFIG += c++11 console
  18. CONFIG -= app_bundle
  19.  
  20. # The following define makes your compiler emit warnings if you use
  21. # any Qt feature that has been marked deprecated (the exact warnings
  22. # depend on your compiler). Please consult the documentation of the
  23. # deprecated API in order to know how to port your code away from it.
  24. DEFINES += QT_DEPRECATED_WARNINGS
  25.  
  26. # You can also make your code fail to compile if it uses deprecated APIs.
  27. # In order to do so, uncomment the following line.
  28. # You can also select to disable deprecated APIs only up to a certain version of Qt.
  29. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
  30.  
  31. SOURCES +=
  32. main.cpp
  33.  
  34. # Default rules for deployment.
  35. qnx: target.path = /tmp/$${TARGET}/bin
  36. else: unix:!android: target.path = /opt/$${TARGET}/bin
  37. !isEmpty(target.path): INSTALLS += target
  38.  
  39.  
  40. #<--------------------- OSG Library
  41. win32 {
  42.  
  43. OSG_LIB_DIRECTORY = $$(OSG_BIN)
  44. OSG_INCLUDE_DIRECTORY = $$(OSG_INCLUDE)
  45.  
  46. CONFIG(debug, debug|release) {
  47.  
  48. TARGET = $$join(TARGET,,,_d)
  49.  
  50. LIBS += -L$$OSG_LIB_DIRECTORY -losgd
  51. LIBS += -L$$OSG_LIB_DIRECTORY -losgViewerd
  52. LIBS += -L$$OSG_LIB_DIRECTORY -losgDBd
  53. LIBS += -L$$OSG_LIB_DIRECTORY -lOpenThreadsd
  54. LIBS += -L$$OSG_LIB_DIRECTORY -losgUtild
  55. LIBS += -L$$OSG_LIB_DIRECTORY -losgGAd
  56. } else {
  57.  
  58. LIBS += -L$$OSG_LIB_DIRECTORY -losg
  59. LIBS += -L$$OSG_LIB_DIRECTORY -losgViewer
  60. LIBS += -L$$OSG_LIB_DIRECTORY -losgDB
  61. LIBS += -L$$OSG_LIB_DIRECTORY -lOpenThreads
  62. LIBS += -L$$OSG_LIB_DIRECTORY -losgUtil
  63. LIBS += -L$$OSG_LIB_DIRECTORY -losgGA
  64.  
  65. }
  66.  
  67. INCLUDEPATH += $$OSG_INCLUDE_DIRECTORY
  68. }
  69.  
  70. unix {
  71.  
  72. CONFIG(debug, debug|release) {
  73.  
  74. TARGET = $$join(TARGET,,,_d)
  75.  
  76. LIBS += -losgd
  77. LIBS += -losgViewerd
  78. LIBS += -losgDBd
  79. LIBS += -lOpenThreadsd
  80.  
  81. } else {
  82.  
  83. LIBS += -losg
  84. LIBS += -losgViewer
  85. LIBS += -losgDB
  86. LIBS += -lOpenThreads
  87.  
  88. }
  89. }
  90. #--------------------- OSG Library !>
  91.  
  92. HEADERS += $$OSG_INCLUDE_DIRECTORY
  93.  
  94.  
  95. #<--------------------- GDAL Library
  96. win32 {
  97. INCLUDEPATH += D:/Interface/Work/Libs/gdal/include/
  98. LIBS += D:/Interface/Work/Libs/gdal/lib/libgdal-20.dll
  99. }
  100.  
  101. unix {
  102. LIBS += -L/usr/local/lib -lgdal
  103. }
  104. #--------------------- GDAL Library !>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement