Skip to content

Commit b0c83c3

Browse files
committed
Partial source and cmake migrations (#669)
Signed-off-by: methylDragon <[email protected]>
1 parent 3c657a7 commit b0c83c3

File tree

78 files changed

+200
-203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+200
-203
lines changed

.github/ci/packages.apt

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
freeglut3-dev
22
libfreeimage-dev
33
libglew-dev
4-
libignition-cmake3-dev
5-
libignition-common5-dev
6-
libignition-math7-dev
7-
libignition-math7-eigen3-dev
8-
libignition-plugin2-dev
9-
libignition-utils2-dev
4+
libgz-cmake3-dev
5+
libgz-common5-dev
6+
libgz-math7-dev
7+
libgz-math7-eigen3-dev
8+
libgz-plugin2-dev
9+
libgz-utils2-dev
1010
libogre-1.9-dev
1111
libxi-dev
1212
libxmu-dev

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
uses: actions/checkout@v2
1212
- name: Compile and test
1313
id: ci
14-
uses: ignition-tooling/action-ignition-ci@focal
14+
uses: gazebo-tooling/action-gz-ci@focal
1515
with:
1616
codecov-enabled: true
1717
cppcheck-enabled: true
@@ -25,4 +25,4 @@ jobs:
2525
uses: actions/checkout@v2
2626
- name: Compile and test
2727
id: ci
28-
uses: ignition-tooling/action-ignition-ci@jammy
28+
uses: gazebo-tooling/action-gz-ci@jammy

.github/workflows/pr-collection-labeler.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ jobs:
88
steps:
99
- name: Add collection labels
1010
if: github.event.action == 'opened'
11-
uses: ignition-tooling/pr-collection-labeler@v1
11+
uses: gazebo-tooling/pr-collection-labeler@v1
1212
with:
1313
github-token: ${{ secrets.GITHUB_TOKEN }}

CMakeLists.txt

+9-11
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ set(GZ_CMAKE_VER ${gz-cmake3_VERSION_MAJOR})
1818
set(CMAKE_CXX_STANDARD 17)
1919
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2020

21-
gz_configure_project(
22-
REPLACE_IGNITION_INCLUDE_PATH gz/rendering
23-
VERSION_SUFFIX pre1)
21+
gz_configure_project(VERSION_SUFFIX pre1)
2422

2523
#============================================================================
2624
# Set project-specific options
@@ -77,7 +75,7 @@ endif()
7775
# Find OGRE
7876
list(APPEND gz_ogre_components "RTShaderSystem" "Terrain" "Overlay" "Paging")
7977

80-
gz_find_package(IgnOGRE VERSION 1.9.0
78+
gz_find_package(GzOGRE VERSION 1.9.0
8179
COMPONENTS ${gz_ogre_components}
8280
REQUIRED_BY ogre
8381
PRIVATE_FOR ogre)
@@ -87,7 +85,7 @@ gz_find_package(IgnOGRE VERSION 1.9.0
8785
# USE_UNOFFICIAL_OGRE_VERSIONS flag
8886
if (NOT USE_UNOFFICIAL_OGRE_VERSIONS)
8987
if (${OGRE_VERSION} VERSION_GREATER_EQUAL 1.10.0)
90-
IGN_BUILD_WARNING("Ogre 1.x versions greater than 1.9 are not officially supported."
88+
GZ_BUILD_WARNING("Ogre 1.x versions greater than 1.9 are not officially supported."
9189
"The software might compile and even work but support from upstream"
9290
"could be reduced to accepting patches for newer versions")
9391
endif()
@@ -105,16 +103,16 @@ endif()
105103

106104
#--------------------------------------
107105
# Find OGRE2: first try to find OGRE2 built with PlanarReflections support and
108-
# fallback to look for OGRE2 without it. Both seems to works for ign-rendering.
106+
# fallback to look for OGRE2 without it. Both seems to works for gz-rendering.
109107
# See https://github.com/gazebosim/gz-rendering/issues/597
110-
gz_find_package(IgnOGRE2 VERSION 2.2.0
108+
gz_find_package(GzOGRE2 VERSION 2.2.0
111109
COMPONENTS HlmsPbs HlmsUnlit Overlay PlanarReflections
112110
PRIVATE_FOR ogre2
113111
QUIET)
114112

115113
if ("${OGRE2-PlanarReflections}" STREQUAL "OGRE2-PlanarReflections-NOTFOUND")
116114
message(STATUS "PlanarReflections component was not found. Try looking without it:")
117-
gz_find_package(IgnOGRE2 VERSION 2.2.0
115+
gz_find_package(GzOGRE2 VERSION 2.2.0
118116
COMPONENTS HlmsPbs HlmsUnlit Overlay
119117
REQUIRED_BY ogre2
120118
PRIVATE_FOR ogre2)
@@ -126,7 +124,7 @@ endif()
126124

127125
# Plugin install dirs
128126
set(GZ_RENDERING_ENGINE_INSTALL_DIR
129-
${CMAKE_INSTALL_PREFIX}/${IGN_LIB_INSTALL_DIR}/gz-${IGN_DESIGNATION}-${PROJECT_VERSION_MAJOR}/engine-plugins
127+
${CMAKE_INSTALL_PREFIX}/${GZ_LIB_INSTALL_DIR}/gz-${GZ_DESIGNATION}-${PROJECT_VERSION_MAJOR}/engine-plugins
130128
)
131129

132130
#--------------------------------------
@@ -155,7 +153,7 @@ else()
155153
set(GZ_RENDERING_PLUGIN_PATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
156154
endif()
157155

158-
set(GZ_RENDERING_RESOURCE_PATH ${CMAKE_INSTALL_PREFIX}/${IGN_DATA_INSTALL_DIR})
156+
set(GZ_RENDERING_RESOURCE_PATH ${CMAKE_INSTALL_PREFIX}/${GZ_DATA_INSTALL_DIR})
159157

160158
#============================================================================
161159
# Configure the build
@@ -180,7 +178,7 @@ gz_configure_build(QUIT_IF_BUILD_ERRORS
180178

181179
if (HAVE_OGRE2)
182180
# Must be done after gz_configure_build or else Terra
183-
# won't see IGN_ADD_fPIC_TO_LIBRARIES
181+
# won't see GZ_ADD_fPIC_TO_LIBRARIES
184182
add_subdirectory(ogre2/src/terrain/Terra)
185183
endif()
186184

Changelog.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@
361361
1. relax gaussian test tolerance
362362
* [Pull request #344](https://github.com/gazebosim/gz-rendering/pull/344)
363363

364-
1. Fix custom shaders uniforms ign version number
364+
1. Fix custom shaders uniforms gz version number
365365
* [Pull request #343](https://github.com/gazebosim/gz-rendering/pull/343)
366366

367367
1. recreate node only when needed

Migration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ release will remove the deprecated code.
7474
*Note*: Calling instead `Camera::Update` for each camera is a waste of CPU resources.
7575
+ It is invalid to modify the scene between `Scene::PreRender` and `Scene::PostRender` (e.g. add/remove objects, lights, etc)
7676
+ Added `Scene::SetCameraPassCountPerGpuFlush`. Setting this value to 0 forces legacy behavior which eases porting.
77-
+ Systems that rely on Graphics components like particle FXs and postprocessing are explicitly affected by Scene's Pre/PostRender. Once `Scene::PostRender` is called, the particle FXs' simulation is moved forward, as well as time values sent to postprocessing shaders. In previous ign-rendering versions each `Camera::Render` call would move the particle simulation forward, which could cause subtle bugs or inconsistencies when Cameras were rendering the same frame from different angles. Setting SetCameraPassCountPerGpuFlush to 0 will also cause these subtle bugs to reappear.
77+
+ Systems that rely on Graphics components like particle FXs and postprocessing are explicitly affected by Scene's Pre/PostRender. Once `Scene::PostRender` is called, the particle FXs' simulation is moved forward, as well as time values sent to postprocessing shaders. In previous gz-rendering versions each `Camera::Render` call would move the particle simulation forward, which could cause subtle bugs or inconsistencies when Cameras were rendering the same frame from different angles. Setting SetCameraPassCountPerGpuFlush to 0 will also cause these subtle bugs to reappear.
7878
7979
1. **Visual.hh** and **Node.hh**
8080
+ `*UserData` methods and the `Variant` type alias have been moved from the `Visual` class to the `Node` class.

README.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Gazebo Rendering is a C++ library designed to provide an abstraction
1818
for different rendering engines. It offers unified APIs for creating
1919
3D graphics applications.
2020

21-
Gazebo Rendering is a component in the ignition framework, a set
21+
Gazebo Rendering is a component in the Gazebo framework, a set
2222
of libraries designed to rapidly develop robot applications.
2323

2424
# Table of Contents
@@ -51,22 +51,22 @@ See the [installation tutorial](https://gazebosim.org/api/rendering/5.0/installa
5151

5252
# Usage
5353

54-
The Ign Rendering API can be found in the documentation. See the
54+
The Gazebo Rendering API can be found in the documentation. See the
5555
[installation tutorial](https://gazebosim.org/api/rendering/5.0/installation.html)
5656
on how to build the documentation files using Doxygen.
5757

5858
You can also take a look at the sample applications in the `examples` folder.
5959

6060
# Folder Structure
6161

62-
* `include/ignition/rendering`: Contains all the public header files which will be installed
62+
* `include/gz/rendering`: Contains all the public header files which will be installed
6363

6464
* `src`: Contains all the C++ source code which are not installed.
6565

6666
* `test`: All integration, performance and regression tests go here, under their
6767
specific folders.
6868

69-
* `examples`: Sample programs to demonstrate different features of ign-rendering
69+
* `examples`: Sample programs to demonstrate different features of gz-rendering
7070

7171
* `doc`: Files used by Doxygen when generating documentation.
7272

@@ -95,4 +95,3 @@ This library uses [Semantic Versioning](https://semver.org/). Additionally, this
9595
# License
9696

9797
This library is licensed under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0). See also the [LICENSE](https://github.com/gazebosim/gz-rendering/blob/main/LICENSE) file.
98-

api.md.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
## Gazebo @IGN_DESIGNATION_CAP@
1+
## Gazebo @GZ_DESIGNATION_CAP@
22

3-
Gazebo @IGN_DESIGNATION_CAP@ is a component in Gazebo, a set of libraries
3+
Gazebo @GZ_DESIGNATION_CAP@ is a component in Gazebo, a set of libraries
44
designed to rapidly develop robot and simulation applications.
55

66
## License

doc/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
find_package(Doxygen)
22

3-
set(IGNITION_DOXYGEN_TAGFILES
3+
set(GZ_DOXYGEN_TAGFILES
44
"\"${CMAKE_BINARY_DIR}/doc/ogre_1-9.tag.xml=https://www.ogre3d.org/docs/api/1.9/\"")
55

66
if (DOXYGEN_FOUND)
7-
configure_file(${IGNITION_CMAKE_DOXYGEN_DIR}/api.in
7+
configure_file(${GZ_CMAKE_DOXYGEN_DIR}/api.in
88
${CMAKE_BINARY_DIR}/api.dox @ONLY)
99

10-
configure_file(${IGNITION_CMAKE_DOXYGEN_DIR}/tutorials.in
10+
configure_file(${GZ_CMAKE_DOXYGEN_DIR}/tutorials.in
1111
${CMAKE_BINARY_DIR}/tutorials.dox @ONLY)
1212

1313
# Find tar

examples/depth_camera/GlutWindow.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ void handleMouse()
218218
}
219219

220220
//////////////////////////////////////////////////
221-
// From ign-sensors/src/DepthCameraSensor.cc
221+
// From gz-sensors/src/DepthCameraSensor.cc
222222
//! [convert depth to image]
223223
void ConvertDepthToImage(
224224
const float *_data,
@@ -295,7 +295,7 @@ void keyboardCB(unsigned char _key, int, int)
295295
}
296296

297297
//////////////////////////////////////////////////
298-
// See ign-sensors/src/DepthCameraSensor.cc
298+
// See gz-sensors/src/DepthCameraSensor.cc
299299
//! [depth frame callback]
300300
void OnNewDepthFrame(const float *_scan,
301301
unsigned int _width, unsigned int _height,
@@ -314,7 +314,7 @@ void initCamera(ir::CameraPtr _camera)
314314
g_camera = _camera;
315315
imgw = g_camera->ImageWidth();
316316
imgh = g_camera->ImageHeight();
317-
ir::Image image = g_camera->CreateImage();
317+
ir::Image image = g_camera->CreateImage();
318318
g_image = std::make_shared<ir::Image>(image);
319319

320320
ir::DepthCameraPtr depthCamera = std::dynamic_pointer_cast<ir::DepthCamera>(

examples/ogre2_demo/Main.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ void buildScene(ScenePtr _scene)
161161

162162
// create a backpack
163163
// backpack mesh is mirrored and requires texture addressing mode to be
164-
// set to 'wrap', which is the default in ign-rendering-ogre2
164+
// set to 'wrap', which is the default in gz-rendering-ogre2
165165
VisualPtr backpack = _scene->CreateVisual("backpack");
166166
backpack->SetLocalPosition(2.5, -1, 0);
167167
backpack->SetLocalRotation(0, 0, -1.57);

examples/simple_demo_qml/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ set(CMAKE_AUTOUIC ON)
5353

5454
add_executable(simple_demo_qml
5555
Main.cc
56-
IgnitionRenderer.hh
57-
IgnitionRenderer.cc
56+
GzRenderer.hh
57+
GzRenderer.cc
5858
ThreadRenderer.h
5959
ThreadRenderer.cpp
6060
${QT_RESOURCES}
@@ -79,7 +79,7 @@ target_link_libraries(simple_demo_qml PUBLIC
7979
set_target_properties(simple_demo_qml
8080
PROPERTIES
8181
QT_QML_MODULE_VERSION 1.0
82-
QT_QML_MODULE_URI IgnitionRendering
82+
QT_QML_MODULE_URI GzRendering
8383
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
8484
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}
8585
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}

examples/simple_demo_qml/Main.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ int main(int _argc, char** _argv)
3636
QSurfaceFormat::setDefaultFormat(format);
3737
RenderThread::Print(format);
3838

39-
qmlRegisterType<ThreadRenderer>("IgnitionRendering", 1, 0,
39+
qmlRegisterType<ThreadRenderer>("GzRendering", 1, 0,
4040
"ThreadRenderer");
4141

4242
QGuiApplication app(_argc, _argv);

examples/simple_demo_qml/Main.qml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import QtQuick 2.0
2-
import IgnitionRendering 1.0
2+
import GzRendering 1.0
33

44
Item {
55
width: 800

examples/simple_demo_qml/ThreadRenderer.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
****************************************************************************/
7070

7171
#include "ThreadRenderer.h"
72-
#include "IgnitionRenderer.hh"
72+
#include "GzRenderer.hh"
7373

7474
#include <QGuiApplication>
7575
#include <QMutex>
@@ -211,7 +211,7 @@ void RenderThread::InitialiseOnMainThread()
211211
Print(this->context->format());
212212

213213
// create renderer
214-
this->renderer = new IgnitionRenderer();
214+
this->renderer = new GzRenderer();
215215
this->renderer->InitialiseOnMainThread();
216216

217217
this->context->doneCurrent();

examples/simple_demo_qml/ThreadRenderer.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
#ifndef GZ_RENDERING_EXAMPLES_SIMPLE_DEMO_QML_THREAD_RENDERER_HH_
7272
#define GZ_RENDERING_EXAMPLES_SIMPLE_DEMO_QML_THREAD_RENDERER_HH_
7373

74-
#include "IgnitionRenderer.hh"
74+
#include "GzRenderer.hh"
7575

7676
#include <QQuickItem>
7777
#include <QMutex>
@@ -109,7 +109,7 @@ public slots:
109109
void TextureReady(int _id, const QSize &_size);
110110

111111
private:
112-
IgnitionRenderer *renderer = nullptr;
112+
GzRenderer *renderer = nullptr;
113113
QSize size;
114114

115115
/// \brief reference to the render window item

examples/waves/media/GerstnerWaves_fs.metal

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fragment float4 main_metal
5656
float3 E = normalize(inPs.eyeVec);
5757
float3 R = reflect(E, N);
5858

59-
// Negate z for use with the skybox texture that comes with ign-rendering
59+
// Negate z for use with the skybox texture that comes with gz-rendering
6060
R = float3(R.x, R.y, -R.z);
6161

6262
// uncomment this line if using other textures that are Y up

examples/waves/media/GerstnerWaves_fs_330.glsl

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void main()
4646
vec3 E = normalize(inPs.eyeVec);
4747
vec3 R = reflect(E, N);
4848

49-
// negate z for use with the skybox texture that comes with ign-rendering
49+
// negate z for use with the skybox texture that comes with gz-rendering
5050
R = vec3(R.x, R.y, -R.z);
5151

5252
// uncomment this line if using other textures that are Y up

include/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
add_subdirectory(gz)
2-
install(DIRECTORY ignition DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL})
2+
install(DIRECTORY ignition DESTINATION ${GZ_INCLUDE_INSTALL_DIR_FULL})

include/gz/rendering/RenderEngineManager.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ namespace gz
5757
public: unsigned int EngineCount() const;
5858

5959
/// \brief Determine if a render-engine with the given name is avaiable.
60-
/// It also checks the list of default engines supplied by ign-rendering.
60+
/// It also checks the list of default engines supplied by gz-rendering.
6161
/// \param[in] _name Name of the desired render-engine
6262
/// \return True if the specified render-engine is available
6363
public: bool HasEngine(const std::string &_name) const;

include/gz/rendering/Scene.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,7 @@ namespace gz
12101210
///
12111211
/// # Legacy mode: Set this value to 0.
12121212
///
1213-
/// Old projects migrating to newer ign versions may break
1213+
/// Old projects migrating to newer gz versions may break
12141214
/// these rules (e.g. not calling Render between Scene's
12151215
/// Pre/PostRender).
12161216
///

include/gz/rendering/base/BaseRayQuery.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ namespace gz
122122
math::Matrix4d viewProjInv = (projectionMatrix * viewMatrix).Inverse();
123123

124124
// rotate start and end
125-
// ign math does not support matrix4 * vec4
125+
// gz math does not support matrix4 * vec4
126126
// so calc homogeneous coordinate w ourselves
127127
double startw = viewProjInv(3, 0) * start[0] +
128128
viewProjInv(3, 1) * start[1] +

include/gz/rendering/base/base.hh.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// Automatically generated
2-
#include <gz/${IGN_PROJECT_NAME}/config.hh>
2+
#include <gz/${GZ_PROJECT_NAME}/config.hh>
33
${ign_headers}

include/gz/rendering/rendering.hh.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// Automatically generated
2-
//#include <gz/${IGN_PROJECT_NAME}/config.hh>
2+
//#include <gz/${GZ_PROJECT_NAME}/config.hh>
33
${ign_headers}

ogre/include/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
add_subdirectory(gz)
2-
install(DIRECTORY ignition DESTINATION ${IGN_INCLUDE_INSTALL_DIR_FULL})
2+
install(DIRECTORY ignition DESTINATION ${GZ_INCLUDE_INSTALL_DIR_FULL})

0 commit comments

Comments
 (0)