diff --git a/jsk_rviz_plugins/src/camera_info_display.h b/jsk_rviz_plugins/src/camera_info_display.h index eaea45ee..315a1f8c 100644 --- a/jsk_rviz_plugins/src/camera_info_display.h +++ b/jsk_rviz_plugins/src/camera_info_display.h @@ -53,6 +53,7 @@ #include #include #include +#include #include #include #include diff --git a/jsk_rviz_plugins/src/overlay_camera_display.cpp b/jsk_rviz_plugins/src/overlay_camera_display.cpp index 110b48d6..800373cd 100644 --- a/jsk_rviz_plugins/src/overlay_camera_display.cpp +++ b/jsk_rviz_plugins/src/overlay_camera_display.cpp @@ -206,7 +206,11 @@ void OverlayCameraDisplay::onInitialize() bg_screen_rect_->setRenderQueueGroup(Ogre::RENDER_QUEUE_BACKGROUND); bg_screen_rect_->setBoundingBox(aabInf); +#if ((OGRE_VERSION_MAJOR << 16) | (OGRE_VERSION_MINOR << 8) | OGRE_VERSION_PATCH) < ((1 << 16) | (10 << 8) | 0) bg_screen_rect_->setMaterial(bg_material_->getName()); +#else + bg_screen_rect_->setMaterial(bg_material_); +#endif bg_scene_node_->attachObject(bg_screen_rect_); bg_scene_node_->setVisible(false); @@ -217,7 +221,11 @@ void OverlayCameraDisplay::onInitialize() fg_material_ = bg_material_->clone( ss.str()+"fg" ); fg_screen_rect_->setBoundingBox(aabInf); +#if ((OGRE_VERSION_MAJOR << 16) | (OGRE_VERSION_MINOR << 8) | OGRE_VERSION_PATCH) < ((1 << 16) | (10 << 8) | 0) fg_screen_rect_->setMaterial(fg_material_->getName()); +#else + fg_screen_rect_->setMaterial(fg_material_); +#endif fg_material_->setSceneBlending( Ogre::SBT_TRANSPARENT_ALPHA ); fg_screen_rect_->setRenderQueueGroup(Ogre::RENDER_QUEUE_OVERLAY - 1); diff --git a/jsk_rviz_plugins/src/overlay_utils.h b/jsk_rviz_plugins/src/overlay_utils.h index 760ba5ab..828d588f 100644 --- a/jsk_rviz_plugins/src/overlay_utils.h +++ b/jsk_rviz_plugins/src/overlay_utils.h @@ -50,6 +50,7 @@ #include #include #else + #include #include #include #include diff --git a/jsk_rviz_plugins/src/polygon_array_display.h b/jsk_rviz_plugins/src/polygon_array_display.h index a2da3fff..4cfec75c 100644 --- a/jsk_rviz_plugins/src/polygon_array_display.h +++ b/jsk_rviz_plugins/src/polygon_array_display.h @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include