Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7 -> main #854

Merged
merged 14 commits into from
May 23, 2023
Merged

7 -> main #854

merged 14 commits into from
May 23, 2023

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented May 22, 2023

➡️ Forward port

Port gz-rendering7 to main

Branch comparison: gz-rendering7...main

I also addressed the todos from #845

Note to maintainers: Remember to Merge with commit (not squash-merge or rebase)

iche033 and others added 13 commits April 7, 2023 15:17
* fix deleting ogre root when created (and deleted) in a thread

Signed-off-by: Ian Chen <[email protected]>
This PR fixes the test failures by:

* Calling eglReleaseThread only when necessary
* Removing window->destroy(), this should be handled when ogre is deleted so we're just calling it twice.
* Disabling the load_unload test on mac - creating/deleting the render engine in a separate thread causes an issue on mac (but works on linux and win) - this needs to be further investigated.

Signed-off-by: Ian Chen <[email protected]>
* prepare for 7.3.1 release

---------

Signed-off-by: Ian Chen <[email protected]>

Signed-off-by: tejalbarnwal <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Co-authored-by: Ian Chen <[email protected]>
Add support for Projectors - an object that projects a texture onto a surface.

In order to get this new feature in gz-rendering7 in an ABI compatible way, I introduced a new SceneExt class that provides a generic CreateExt function for creating a Projector object. The proper way is to add CreateProjector virtual function in base class and override them in ogre 1.x and 2.x implementation which changes vtable and so breaks ABI. I have added all these functions but they are commented out with a todo not to uncomment them when forward porting to gz-rendering8

* The ogre 1.x implementation is ported from gazebo-classic's Projector class. It uses ogre material projective texturing feature. in addition, I extended the implementation to support visibility flags so that we can toggle the visibility of the projected texture based on the camera's visibility mask.
* The ogre 2.x implementation uses screen space decals (instead of projective texturing) and has a different behavior.
Also added support for setting visibility flags. Note: There is one major caveat with this implementation. The projection is not in the form of a "frustum" (i.e. projection becomes larger at longer distance). It uses ogre 2.x screen space decals. Think of a as a rectangular volume and any surface that intersects with the volume will have the texture mapped onto it. We will need to investigate whether it's possible to change the implementation to match the ogre 1.x behavior in the future. 

---------

Signed-off-by: Ian Chen <[email protected]>
* Enable binary relocatability

Signed-off-by: Silvio Traversaro <[email protected]>

---------

Signed-off-by: Silvio Traversaro <[email protected]>
Co-authored-by: Ian Chen <[email protected]>
* Prepare for 7.4.0 release

---------

Signed-off-by: Ian Chen <[email protected]>
Old GPUs and systems with incomplete GL implementations like WSLg would trigger shader compiler errors for several reasons:

* because C++ saw that GL_ARB_shader_storage_buffer_object was supported but we didn't request it in the shader.
* because C++ required the use of GLSL 4.30 (not supported by d3d12 as of 2023/05), even if GLSL 4.20 plus some extensions would also work fine.

This was tested on both mesa 22.2.5 and 23.1.0 .

---------

Signed-off-by: Silvio Traversaro <[email protected]>
Signed-off-by: Silvio Traversaro <[email protected]>
@github-actions github-actions bot added the 🎵 harmonic Gazebo Harmonic label May 22, 2023
@codecov
Copy link

codecov bot commented May 22, 2023

Codecov Report

Merging #854 (1e6be05) into main (6b6cd91) will decrease coverage by 0.28%.
The diff coverage is 60.27%.

❗ Current head 1e6be05 differs from pull request most recent head b3251c2. Consider uploading reports for the commit b3251c2 to get more accurate results

@@            Coverage Diff             @@
##             main     #854      +/-   ##
==========================================
- Coverage   75.29%   75.01%   -0.28%     
==========================================
  Files         177      183       +6     
  Lines       16034    16311     +277     
==========================================
+ Hits        12072    12236     +164     
- Misses       3962     4075     +113     
Impacted Files Coverage Δ
include/gz/rendering/Scene.hh 0.00% <ø> (ø)
include/gz/rendering/base/BaseScene.hh 0.00% <0.00%> (ø)
ogre2/src/Ogre2Camera.cc 80.20% <0.00%> (-0.41%) ⬇️
src/CameraLens.cc 73.68% <ø> (ø)
src/PixelFormat.cc 100.00% <ø> (ø)
src/Utils.cc 63.63% <0.00%> (-35.19%) ⬇️
ogre2/src/Ogre2Scene.cc 77.25% <44.00%> (-1.22%) ⬇️
include/gz/rendering/base/SceneExt.hh 66.66% <66.66%> (ø)
ogre2/src/Ogre2RenderTarget.cc 82.64% <68.75%> (-0.59%) ⬇️
ogre2/src/Ogre2Projector.cc 71.42% <71.42%> (ø)
... and 9 more

... and 3 files with indirect coverage changes

Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clang warning https://build.osrfoundation.org/job/ignition_rendering-ci-pr_any-homebrew-amd64/3114/clang/

OgreScene.hh:209 | -Winconsistent-missing-override | Normal | 1
-- | -- | -- | --
'CreateProjectorImpl' overrides a member function but is not marked 'override'

[OgreScene.hh:209](https://build.osrfoundation.org/job/ignition_rendering-ci-pr_any-homebrew-amd64/3114/clang/source.10fac718-3a16-4e77-ab84-feee44eaf9f0/#209)	[-Winconsistent-missing-override](https://build.osrfoundation.org/job/ignition_rendering-ci-pr_any-homebrew-amd64/3114/clang/category.-52657057/)	[Normal](https://build.osrfoundation.org/job/ignition_rendering-ci-pr_any-homebrew-amd64/3114/clang/NORMAL)	1
'CreateProjectorImpl' overrides a member function but is not marked 'override'

and windows not compiling https://build.osrfoundation.org/job/ign_rendering-pr-win/3237/consoleFull#-19094054888ff58640-3599-4406-a210-216932f1748c

@iche033 iche033 force-pushed the merge_7_main_20230522 branch 2 times, most recently from d28f57a to 62d0d05 Compare May 23, 2023 17:08
@iche033 iche033 force-pushed the merge_7_main_20230522 branch from 62d0d05 to b3251c2 Compare May 23, 2023 18:08
@iche033
Copy link
Contributor Author

iche033 commented May 23, 2023

homebrew warning and windows build are fixed

@iche033 iche033 requested a review from ahcorde May 23, 2023 20:18
@iche033 iche033 merged commit 5c78bd5 into main May 23, 2023
@iche033 iche033 deleted the merge_7_main_20230522 branch May 23, 2023 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎵 harmonic Gazebo Harmonic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants