Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ endif()
# fallback to look for OGRE2 without it. Both seems to works for gz-rendering.
# See https://github.com/gazebosim/gz-rendering/issues/597
gz_find_package(GzOGRE2 VERSION 2.3.1
COMPONENTS HlmsPbs HlmsUnlit Overlay PlanarReflections
COMPONENTS HlmsPbs HlmsUnlit PlanarReflections
PRIVATE_FOR ogre2
QUIET)

if ("${OGRE2-PlanarReflections}" STREQUAL "OGRE2-PlanarReflections-NOTFOUND")
message(STATUS "PlanarReflections component was not found. Try looking without it:")
gz_find_package(GzOGRE2 VERSION 2.3.1
COMPONENTS HlmsPbs HlmsUnlit Overlay
COMPONENTS HlmsPbs HlmsUnlit
REQUIRED_BY ogre2
PRIVATE_FOR ogre2)
endif()
Expand Down
13 changes: 13 additions & 0 deletions Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ Deprecated code produces compile-time warnings. These warning serve as
notification to users that their code should be upgraded. The next major
release will remove the deprecated code.

## Gazebo Rendering 10.x to 11.x

### Removals

The dependency on ogre2's Overlay component is removed, mainly due to:
https://github.com/OGRECave/ogre-next/issues/541.
The `Ogre::v1::OverlaySystem` was not used internally and the
relevant API was always marked as internal so it is removed in
gz-rendering11 instead of going through the tick-tock deprecation cycle.

1. **Ogre2RenderEngine**
+ Removed: `Ogre::v1::OverlaySystem *OverlaySystem() const`

## Gazebo Rendering 9.x to 10.x

### Deprecations
Expand Down
7 changes: 0 additions & 7 deletions ogre2/include/gz/rendering/ogre2/Ogre2Includes.hh
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,6 @@
#include <Compositor/Pass/PassScene/OgreCompositorPassScene.h>
#include <Compositor/Pass/PassScene/OgreCompositorPassSceneDef.h>

#include <Overlay/OgreOverlayPrerequisites.h>
#include <Overlay/OgreOverlayManager.h>
#include <Overlay/OgreOverlayElement.h>
#include <Overlay/OgreOverlayContainer.h>
#include <Overlay/OgreFontManager.h>
#include <Overlay/OgreOverlaySystem.h>

// TODO(anyone): enable when ogre 2.1 fully supports paging
// and terrain components
// #include <Paging/OgrePageManager.h>
Expand Down
16 changes: 0 additions & 16 deletions ogre2/include/gz/rendering/ogre2/Ogre2RenderEngine.hh
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ namespace Ogre
class LogManager;
class Root;
class Window;
namespace v1
{
class OverlaySystem;
}

class HlmsPbsTerraShadows;
class CompositorWorkspaceListener;
}
Expand Down Expand Up @@ -161,9 +156,6 @@ namespace gz
/// \brief Create ogre root
private: void CreateRoot();

/// \brief Create ogre overlay component
private: void CreateOverlay();

/// \brief Create ogre plugins.
private: void LoadPlugins();

Expand All @@ -187,11 +179,6 @@ namespace gz
/// \return Ogre HLMS customizations
public: Ogre2GzHlmsSphericalClipMinDistance &SphericalClipMinDistance();

/// \internal
/// \brief Get a pointer to the Ogre overlay system.
/// \return Pointer to the ogre overlay system.
public: Ogre::v1::OverlaySystem *OverlaySystem() const;

/// \internal
/// \brief Sets the current rendering mode. See GzOgreRenderingMode
/// and see Ogre::GzHlmsPbs
Expand Down Expand Up @@ -221,9 +208,6 @@ namespace gz
/// \return a pointer to the render engine
public: static Ogre2RenderEngine *Instance();

/// \brief Pointer to the ogre's overlay system
private: Ogre::v1::OverlaySystem *ogreOverlaySystem = nullptr;

/// \brief List of scenes managed by the render engine
private: Ogre2SceneStorePtr scenes;

Expand Down
16 changes: 0 additions & 16 deletions ogre2/src/Ogre2RenderEngine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,6 @@ void Ogre2RenderEngine::Destroy()
this->scenes->RemoveAll();
}

delete this->ogreOverlaySystem;
this->ogreOverlaySystem = nullptr;

this->dataPtr->hlmsPbsTerraShadows.reset();

if (this->ogreRoot)
Expand Down Expand Up @@ -501,7 +498,6 @@ void Ogre2RenderEngine::LoadAttempt()
}

this->CreateRoot();
this->CreateOverlay();
this->LoadPlugins();
this->CreateRenderSystem();
this->ogreRoot->initialise(false);
Expand Down Expand Up @@ -636,12 +632,6 @@ void Ogre2RenderEngine::CreateRoot()
}
}

//////////////////////////////////////////////////
void Ogre2RenderEngine::CreateOverlay()
{
this->ogreOverlaySystem = new Ogre::v1::OverlaySystem();
}

//////////////////////////////////////////////////
void Ogre2RenderEngine::LoadPlugins()
{
Expand Down Expand Up @@ -1416,12 +1406,6 @@ SphericalClipMinDistance()
return this->dataPtr->sphericalClipMinDistance;
}

/////////////////////////////////////////////////
Ogre::v1::OverlaySystem *Ogre2RenderEngine::OverlaySystem() const
{
return this->ogreOverlaySystem;
}

/////////////////////////////////////////////////
void Ogre2RenderEngine::SetGzOgreRenderingMode(
GzOgreRenderingMode renderingMode)
Expand Down
15 changes: 0 additions & 15 deletions ogre2/src/Ogre2Scene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@
#include <OgrePlatformInformation.h>
#include <OgreRoot.h>
#include <OgreSceneManager.h>
#include <Overlay/OgreOverlayManager.h>
#include <Overlay/OgreOverlaySystem.h>
#if OGRE_VERSION_MAJOR == 2 && OGRE_VERSION_MINOR == 1
#include <OgreHlms.h>
#include <OgreHlmsManager.h>
Expand Down Expand Up @@ -501,12 +499,6 @@ void Ogre2Scene::Destroy()

BaseScene::Destroy();

if (this->ogreSceneManager)
{
this->ogreSceneManager->removeRenderQueueListener(
Ogre2RenderEngine::Instance()->OverlaySystem());
}

if (this->dataPtr->activeGi)
{
this->dataPtr->activeGi->Destroy();
Expand Down Expand Up @@ -1477,13 +1469,6 @@ void Ogre2Scene::CreateContext()
this->ogreSceneManager = root->createSceneManager(Ogre::ST_GENERIC,
numThreads);

this->ogreSceneManager->addRenderQueueListener(
Ogre2RenderEngine::Instance()->OverlaySystem());

this->ogreSceneManager->getRenderQueue()->setSortRenderQueue(
Ogre::v1::OverlayManager::getSingleton().mDefaultRenderQueueId,
Ogre::RenderQueue::StableSort);

// Set sane defaults for proper shadow mapping
this->ogreSceneManager->setShadowDirectionalLightExtrusionDistance(500.0f);
this->ogreSceneManager->setShadowFarDistance(500.0f);
Expand Down
Loading