Skip to content

Rename Ogre2 into OgreNext#1289

Open
sumir0 wants to merge 11 commits intogazebosim:mainfrom
sumir0:rework-ogre2-into-ogre-next
Open

Rename Ogre2 into OgreNext#1289
sumir0 wants to merge 11 commits intogazebosim:mainfrom
sumir0:rework-ogre2-into-ogre-next

Conversation

@sumir0
Copy link
Copy Markdown

@sumir0 sumir0 commented May 4, 2026

🎉 New feature

Partly related to gazebosim/gz-sim#2753.

Summary

This PR renames ogre2 definitions into ogre-next definitions. By default, it builds ogre2 plugin alongside ogre_next plugin. An option is present to disable build of ogre2 plugin. Ogre2-related typedefs were added.

Note

There were some experiments with OGRE-Next 3.0 support several years ago. This PR might repeat some of the work that was done before. My apologies if that is the case.

Commit description

  • Rename ogre2 related definitions into ogre_next
  • Add option to use ogre next >= 3.0.0
  • Provide ogre2 definitions for backwards-compatibility

Test it

Please, note: I did not use Ubuntu for testing. Instead, I used Arch Linux. I guess the following test algorithm should work in Ubuntu.

My test process involved installing OGRE-Next of version 2.3.3 from sources first. Then I installed gz-cmake, gz-utils, gz-math, gz-common, gz-plugin, gz-msgs, gz-fuel-tools, gz-transport from source. After that I built gz-rendering using the following cmake command:

cd build/
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ cmake -S ../ -B ./ -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Debug

After installing it I ran make test. There were 2 failed tests. I manually specified the following environment variables in the IDE I use:

LD_LIBRARY_PATH=/usr/local/lib
GZ_ENGINE_TO_TEST=ogre2
OGRE_NEXT_RESOURCE_PATH=/usr/local/lib/OGRE-Next/

After that those 2 failed tests were not failing if run from the IDE.
To test gz-rendering-ogre2 plugin I used examples/ogre2_demo example. It displayed a scene with some objects in it. To test gz-rendering-ogre_next plugin I changed two "ogre2" strings in examples/ogre2_demo/Main.cc into "ogre_next". After that it also displayed a scene with some objects in it (but it used gz-rendering-ogre_next plugin).

The /usr/local/include/ and /usr/local/lib/ directories contained the files I expected from it:

  • gz/rendering/ogre2 include directory and headers,
  • gz/rendering/ogre_next include directory and headers,
  • 2 plugins.

After that I cleaned /usr/local/* directories and the directory where gz-rendering was built. Then I installed OGRE-Next of version 3.0.0 from sources and gz-cmake, gz-utils, gz-math, gz-common, gz-plugin, gz-msgs, gz-fuel-tools, gz-transport from source as earlier. After that I built gz-rendering using the following cmake command:

cd build/
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ cmake -S ../ -B ./ -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Debug -DUSE_OGRE_NEXT_INSTEAD_OF_OGRE2=ON

After installing it I ran make test. There were no failed tests, only 12 tests were present (I did not add tests for gz-rendering-ogre_next plugin, the PR seems big even without them)

To test gz-rendering-ogre2 plugin I used examples/ogre2_demo example. I reverted my local changes in the example. It did not display any scene because this PR does not build gz-rendering-ogre2 plugin with USE_OGRE_NEXT_INSTEAD_OF_OGRE2 option. To test gz-rendering-ogre_next plugin I changed two "ogre2" strings in examples/ogre2_demo/Main.cc into "ogre_next" as before. After that it also displayed a scene with some objects in it.

The /usr/local/include/ and /usr/local/lib/ directories contained the files I expected from it:

  • gz/rendering/ogre2 include directory and headers (I decided to leave them as without USE_OGRE_NEXT_INSTEAD_OF_OGRE2 option, because deprecation warnings are not added just yet),
  • gz/rendering/ogre_next include directory and headers,
  • 1 plugin (gz-rendering-ogre_next).

Checklist

  • Signed all commits for DCO
  • Added a screen capture or video to the PR description that demonstrates the feature
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • Updated Bazel files (if adding new files). Created an issue otherwise.
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers
  • Was GenAI used to generate this PR? If so, make sure to add "Generated-by" to your commits. (See this policy for more info.)

Bazel files might require additional modifications. I have read somewhere that Bazel is not supported for plugins at the moment, therefore minimal changes were done (be aware, I did not test changes to Bazel configuration, I tried to focus on CMake configuration only).

There are a lot of things missing (tests for gz-rendering-ogre_next plugin, examples, tutorials, documentation, updates for media folder from OGRE-Next 3.0.0 if any, etc.). I tried to minimize changes but also to provide a ready-to-go PR. This PR may require developers to redo some of their ongoing work in ogre2/ folder if any after merging the PR.

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by and Generated-by messages.

* Rename ogre2 related definitions into ogre_next
* Add option to use ogre next >= 3.0.0
* Provide ogre2 definitions for backwards-compatibility

Signed-off-by: Ramir Sultanov <sumir0@proton.me>
sumir0 added 10 commits May 5, 2026 06:46
Signed-off-by: Ramir Sultanov <sumir0@proton.me>
Signed-off-by: Ramir Sultanov <sumir0@proton.me>
Signed-off-by: Ramir Sultanov <sumir0@proton.me>
Signed-off-by: Ramir Sultanov <sumir0@proton.me>
Signed-off-by: Ramir Sultanov <sumir0@proton.me>
This reverts commit 80eeb90.

Signed-off-by: Ramir Sultanov <sumir0@proton.me>
Signed-off-by: Ramir Sultanov <sumir0@proton.me>
Signed-off-by: Ramir Sultanov <sumir0@proton.me>
Signed-off-by: Ramir Sultanov <sumir0@proton.me>
…ts.txt`

Signed-off-by: Ramir Sultanov <sumir0@proton.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

2 participants