forked from gazebosim/gz-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Metal] Add Metal support to Minimal Scene
- Set ogre2 render engine as default and ensure the Qt surface format supports OpenGL 4.1 - Default ogre render engine to version to ogre2 in CMakeLists.txt, scene3d.config and Scene3D. - Set default QSurfaceFormat to OpenGL 4.1 in applications - cherry-pick 066d276 - Experimental support for Metal in Scene3D and MinimalScene plugins (OpenGL is disabled) - Modify examples/standalone/window to use Metal backend in the Qt scene graph and force render loop to be single threaded - Modify ign.cc commandlets to use Metal backend in the Qt scene graph and force render loop to be single threaded - Use CFBridgingRetain / CFBridgingRelease to manage access to Metal texture objects. - Force render engine to initialise on the main thread. - Fix build after interface changes - Fix build after changes in gazebosim/gz-rendering#477 - Reverse changes to isolate issues in transform control - Add cross-platform support to MinimalScene TextureNode - Introduce abstract delegate class for the TextureNode - Add implementations for OpenGL and Metal - Add cross-platform support to MinimalScene RenderThread - Introduce abstract delegate class for the RenderThread - Add implementations for OpenGL and Metal - Update CMakeLists.txt for cross-platform - Only include objective-c and Apple frameworks for macOS - Add render interface for a camera texture - Change name of render interface files - Refactor file names to use `Rhi` suffix - Refactor names of render interface classes - Replace Delegate with Rhi (render hardware interface - from Qt) - Add render hardware interface for the ignition renderer - Update MinimalScene to use a render hardware interface to retrieve the camera texture - Convert MinimalScene back to c++ - All Metal specific code moved out of MinimalScene to render interface classes - Rename MinimalScene and compile as c++ - Allow render system to be switched between Metal and OpenGL - Add method SetRenderSystem - Update classes in MinimalScene to allow the render system to be set in the plugin XML - Move all scene graph backend config to Application - Set textureDirty flag true on initialisation - Fix an issue where the initial texture is not sized correctly on initialisation leading to aliasing artefacts - Fix after rebasing onto ign-gui6 [QML] update function call syntax in Connections blocks - Change syntax to address warning: QML Connections: Implicitly defined onFoo properties in Connections are deprecated - Qt 5.15, see: https://doc.qt.io/qt-5/qml-qtqml-connections.html - Add missing properties for tooltopDelay - cherry-pick ac51e07 Signed-off-by: Rhys Mainwaring <[email protected]>
- Loading branch information
1 parent
f8af480
commit 12262ce
Showing
19 changed files
with
3,239 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,40 @@ | ||
set(SOURCES | ||
MinimalScene.cc | ||
MinimalSceneRhi.cc | ||
MinimalSceneRhiOpenGL.cc | ||
) | ||
|
||
set(PROJECT_LINK_LIBS "") | ||
|
||
# Objective-C sources for macOS | ||
if (APPLE) | ||
set(SOURCES | ||
${SOURCES} | ||
MinimalSceneRhiMetal.mm | ||
) | ||
|
||
set(PROJECT_LINK_LIBS | ||
"-framework AppKit" | ||
"-framework Metal" | ||
) | ||
endif() | ||
|
||
ign_gui_add_plugin(MinimalScene | ||
SOURCES | ||
MinimalScene.cc | ||
${SOURCES} | ||
QT_HEADERS | ||
MinimalScene.hh | ||
PUBLIC_LINK_LIBS | ||
ignition-rendering${IGN_RENDERING_VER}::ignition-rendering${IGN_RENDERING_VER} | ||
${PROJECT_LINK_LIBS} | ||
) | ||
|
||
# Enable ARC on selected source files | ||
if (APPLE) | ||
set_source_files_properties( | ||
MinimalSceneRhiMetal.mm | ||
PROPERTIES | ||
COMPILE_FLAGS | ||
"-fobjc-arc" | ||
) | ||
endif() |
Oops, something went wrong.