Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Patch RVIZ for OGRE1.9

By: a guest on Dec 13th, 2013  |  syntax: Diff  |  size: 6.54 KB  |  views: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff -aur ./rviz-orig/CMakeLists.txt ./rviz/CMakeLists.txt
  2. --- ./rviz-orig/CMakeLists.txt  2013-12-12 22:13:13.559986000 +0100
  3. +++ ./rviz/CMakeLists.txt       2013-12-12 22:59:59.970236425 +0100
  4. @@ -21,6 +21,18 @@
  5.  OUTPUT_VARIABLE OGRE_PLUGIN_PATH
  6.  OUTPUT_STRIP_TRAILING_WHITESPACE
  7.  )
  8. +
  9. +pkg_check_modules(OGRE-Overlay OGRE-Overlay)
  10. +if (OGRE-Overlay_FOUND)
  11. +set(OGRE_LDFLAGS ${OGRE_LDFLAGS} ${OGRE-Overlay_LDFLAGS})
  12. +set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${OGRE-Overlay_INCLUDE_DIRS})
  13. +set(OGRE_LIBRARIES ${OGRE_LIBRARIES};${OGRE-Overlay_LIBRARIES})
  14. +set(OGRE_LIBRARY_DIRS ${OGRE_LIBRARY_DIRS} ${OGRE-Overlay_LIBRARY_DIRS})
  15. +set(OGRE_CFLAGS ${OGRE_CFLAGS} ${OGRE-Overlay_CFLAGS})
  16. +endif()
  17. +
  18. +
  19. +
  20.  message(STATUS OGRE_PLUGIN_PATH=${OGRE_PLUGIN_PATH})
  21.  
  22.  if(APPLE)
  23. diff -aur ./rviz-orig/src/rviz/default_plugin/map_display.cpp ./rviz/src/rviz/default_plugin/map_display.cpp
  24. --- ./rviz-orig/src/rviz/default_plugin/map_display.cpp 2013-12-12 22:13:13.596653000 +0100
  25. +++ ./rviz/src/rviz/default_plugin/map_display.cpp      2013-12-13 00:41:04.798826913 +0100
  26. @@ -60,7 +60,7 @@
  27.  MapDisplay::MapDisplay()
  28.    : Display()
  29.    , manual_object_( NULL )
  30. -  , material_( 0 )
  31. +  //~ , material_( NULL )
  32.    , loaded_( false )
  33.    , resolution_( 0.0f )
  34.    , width_( 0 )
  35. diff -aur ./rviz-orig/src/rviz/ogre_helpers/movable_text.cpp ./rviz/src/rviz/ogre_helpers/movable_text.cpp
  36. --- ./rviz-orig/src/rviz/ogre_helpers/movable_text.cpp  2013-12-12 22:13:13.613319000 +0100
  37. +++ ./rviz/src/rviz/ogre_helpers/movable_text.cpp       2013-12-12 22:17:48.955047760 +0100
  38. @@ -47,7 +47,7 @@
  39.  #include "OGRE/OgreSceneNode.h"
  40.  #include "OGRE/OgreMaterialManager.h"
  41.  #include "OGRE/OgreHardwareBufferManager.h"
  42. -#include "OGRE/OgreFontManager.h"
  43. +#include "OGRE/Overlay/OgreFontManager.h"
  44.  
  45.  #include <sstream>
  46.  
  47. diff -aur ./rviz-orig/src/rviz/ogre_helpers/movable_text.h ./rviz/src/rviz/ogre_helpers/movable_text.h
  48. --- ./rviz-orig/src/rviz/ogre_helpers/movable_text.h    2013-12-12 22:13:13.613319000 +0100
  49. +++ ./rviz/src/rviz/ogre_helpers/movable_text.h 2013-12-12 22:19:51.727664899 +0100
  50. @@ -50,6 +50,7 @@
  51.  {
  52.  class RenderQueue;
  53.  class Camera;
  54. +class Font;
  55.  }
  56.  
  57.  namespace rviz
  58. diff -aur ./rviz-orig/src/rviz/ogre_helpers/point_cloud.cpp ./rviz/src/rviz/ogre_helpers/point_cloud.cpp
  59. --- ./rviz-orig/src/rviz/ogre_helpers/point_cloud.cpp   2013-12-12 22:13:13.613319000 +0100
  60. +++ ./rviz/src/rviz/ogre_helpers/point_cloud.cpp        2013-12-13 00:03:32.377725195 +0100
  61. @@ -137,19 +137,20 @@
  62.    std::stringstream ss;
  63.    static int count = 0;
  64.    ss << "PointCloudMaterial" << count++;
  65. -  point_material_ = Ogre::MaterialManager::getSingleton().getByName("rviz/PointCloudPoint");
  66. -  square_material_ = Ogre::MaterialManager::getSingleton().getByName("rviz/PointCloudSquare");
  67. -  flat_square_material_ = Ogre::MaterialManager::getSingleton().getByName("rviz/PointCloudFlatSquare");
  68. -  sphere_material_ = Ogre::MaterialManager::getSingleton().getByName("rviz/PointCloudSphere");
  69. -  tile_material_ = Ogre::MaterialManager::getSingleton().getByName("rviz/PointCloudTile");
  70. -  box_material_ = Ogre::MaterialManager::getSingleton().getByName("rviz/PointCloudBox");
  71. -
  72. -  point_material_ = Ogre::MaterialPtr(point_material_)->clone(ss.str() + "Point");
  73. -  square_material_ = Ogre::MaterialPtr(square_material_)->clone(ss.str() + "Square");
  74. -  flat_square_material_ = Ogre::MaterialPtr(flat_square_material_)->clone(ss.str() + "FlatSquare");
  75. -  sphere_material_ = Ogre::MaterialPtr(sphere_material_)->clone(ss.str() + "Sphere");
  76. -  tile_material_ = Ogre::MaterialPtr(tile_material_)->clone(ss.str() + "Tiles");
  77. -  box_material_ = Ogre::MaterialPtr(box_material_)->clone(ss.str() + "Box");
  78. +
  79. +  point_material_ = Ogre::MaterialManager::getSingleton().getByName("rviz/PointCloudPoint").staticCast<Ogre::Material>();
  80. +  square_material_ = Ogre::MaterialManager::getSingleton().getByName("rviz/PointCloudSquare").staticCast<Ogre::Material>();
  81. +  flat_square_material_ = Ogre::MaterialManager::getSingleton().getByName("rviz/PointCloudFlatSquare").staticCast<Ogre::Material>();
  82. +  sphere_material_ = Ogre::MaterialManager::getSingleton().getByName("rviz/PointCloudSphere").staticCast<Ogre::Material>();
  83. +  tile_material_ = Ogre::MaterialManager::getSingleton().getByName("rviz/PointCloudTile").staticCast<Ogre::Material>();
  84. +  box_material_ = Ogre::MaterialManager::getSingleton().getByName("rviz/PointCloudBox").staticCast<Ogre::Material>();
  85. +
  86. +  point_material_ = point_material_->clone(ss.str() + "Point");
  87. +  square_material_ = square_material_->clone(ss.str() + "Square");
  88. +  flat_square_material_ = flat_square_material_->clone(ss.str() + "FlatSquare");
  89. +  sphere_material_ = sphere_material_->clone(ss.str() + "Sphere");
  90. +  tile_material_ = tile_material_->clone(ss.str() + "Tiles");
  91. +  box_material_ = box_material_->clone(ss.str() + "Box");
  92.  
  93.    point_material_->load();
  94.    square_material_->load();
  95. @@ -174,12 +175,12 @@
  96.    tile_material_->unload();
  97.    box_material_->unload();
  98.  
  99. -  Ogre::MaterialManager::getSingleton().remove(point_material_);
  100. +  /*Ogre::MaterialManager::getSingleton().remove(point_material_);
  101.    Ogre::MaterialManager::getSingleton().remove(square_material_);
  102.    Ogre::MaterialManager::getSingleton().remove(flat_square_material_);
  103.    Ogre::MaterialManager::getSingleton().remove(sphere_material_);
  104.    Ogre::MaterialManager::getSingleton().remove(tile_material_);
  105. -  Ogre::MaterialManager::getSingleton().remove(box_material_);
  106. +  Ogre::MaterialManager::getSingleton().remove(box_material_);*/
  107.  }
  108.  
  109.  const Ogre::AxisAlignedBox& PointCloud::getBoundingBox() const
  110. diff -aur ./rviz-orig/src/rviz/ogre_helpers/point_cloud.h ./rviz/src/rviz/ogre_helpers/point_cloud.h
  111. --- ./rviz-orig/src/rviz/ogre_helpers/point_cloud.h     2013-12-12 22:13:13.613319000 +0100
  112. +++ ./rviz/src/rviz/ogre_helpers/point_cloud.h  2013-12-12 22:21:13.920518605 +0100
  113. @@ -213,12 +213,12 @@
  114.    Ogre::Vector3 common_direction_;          ///< See Ogre::BillboardSet::setCommonDirection
  115.    Ogre::Vector3 common_up_vector_;          ///< See Ogre::BillboardSet::setCommonUpVector
  116.  
  117. -  Ogre::ResourcePtr point_material_;
  118. -  Ogre::ResourcePtr square_material_;
  119. -  Ogre::ResourcePtr flat_square_material_;
  120. -  Ogre::ResourcePtr sphere_material_;
  121. -  Ogre::ResourcePtr tile_material_;
  122. -  Ogre::ResourcePtr box_material_;
  123. +  Ogre::MaterialPtr point_material_;
  124. +  Ogre::MaterialPtr square_material_;
  125. +  Ogre::MaterialPtr flat_square_material_;
  126. +  Ogre::MaterialPtr sphere_material_;
  127. +  Ogre::MaterialPtr tile_material_;
  128. +  Ogre::MaterialPtr box_material_;
  129.    Ogre::MaterialPtr current_material_;
  130.    float alpha_;
clone this paste RAW Paste Data