Commit Graph

145 Commits

Author SHA1 Message Date
Rémi Verschelde 269b115d9c SCons: Disable C++ exception handling
Upon investigating the extremely slow MSVC build times in #80513, I noticed
that while Godot policy is to never use exceptions, we weren't enforcing it
with compiler flags, and thus still included exception handling code and
stack unwinding.

This is wasteful on multiple aspects:

- Binary size: Around 20% binary size reduction with exceptions disabled
  for both MSVC and GCC binaries.
- Compile time:
  * More than 50% build time reduction with MSVC.
  * 10% to 25% build time reduction with GCC + LTO.
- Performance: Possibly, needs to be benchmarked.

Since users may want to re-enable exceptions in their own thirdparty code
or the libraries they compile with Godot, this behavior can be toggled with
the `disable_exceptions` SCons option, which defaults to true.

(cherry picked from commit 3907e53ff6)
2023-09-20 22:44:05 +02:00
Rémi Verschelde 8be838481d Allow unbundling OpenXR (for Linux distros)
Copy XrMatrix4x4f_CreateProjectionFov to our OpenXRUtil, instead of relying
on a private header.

(cherry picked from commit 34a07b81ae)
2023-09-20 22:44:05 +02:00
A Thousand Ships d5c246bbd3 Ensure OpenXR classes are declared properly
Co-authored-by: Bastiaan Olij <mux213@gmail.com>
(cherry picked from commit c23bd8b143)
2023-09-20 22:44:03 +02:00
Bastiaan Olij ed9216d1d8 Fix issue with accessing hand tracking without timing info
(cherry picked from commit 72bd997fe8)
2023-08-31 20:19:30 +02:00
Rémi Verschelde fa7f8e34f2
Merge pull request #78135 from BastiaanOlij/fix_openxr_passthrough
Fix OpenXR Passthrough mode
2023-06-23 11:59:16 +02:00
Bastiaan Olij 2bc85f9ac6 Fix incorrect depth buffer option in OpenXR 2023-06-22 19:03:08 +10:00
Rémi Verschelde 25b2f1780a
Style: Harmonize header includes in modules
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:

Includes from the platform port or module ("local" includes) should be listed
first in their own block using relative paths, before Godot's "core" includes
which use "absolute" (project folder relative) paths, and finally thirdparty
includes.

Includes in `#ifdef`s come after their relevant section, i.e. the overall
structure is:

- Local includes
  * Conditional local includes
- Core includes
  * Conditional core includes
- Thirdparty includes
  * Conditional thirdparty includes
2023-06-15 14:35:45 +02:00
Bastiaan Olij e6e27f8be4 Fix OpenXR Passthrough mode 2023-06-12 21:29:38 +10:00
Rémi Verschelde 00215ec904
Merge pull request #74930 from BastiaanOlij/fix_action_map_entries
Fix incorrect HTC action map entries
2023-05-08 12:20:17 +02:00
Rémi Verschelde e1075e9c7c
Fix various typos with codespell
Also includes the grammar fix from #76206.

Co-authored-by: Peter Anderson <BWPanda@users.noreply.github.com>
2023-04-26 13:57:09 +02:00
Danil Alexeev 36bedd341a
Fix misuses of error macros 2023-04-18 10:20:48 +03:00
Rémi Verschelde c5d9470c7c
Merge pull request #75765 from YuriSizov/editor-node-optimize-includes
Improve includes of `EditorNode` (and everything else)
2023-04-11 19:40:24 +02:00
Rémi Verschelde 1eec25acf3
Merge pull request #73558 from Malcolmnixon/render-target-size-multiplier
Added render target size multiplier option
2023-04-11 19:40:02 +02:00
Yuri Sizov 4154039832 Improve includes of EditorNode (and everything else)
Also start organizing editor-specific GUI components
into a dedicated folder, `editor/gui`.
Also move `editor_file_server` next to the rest of debugger classes.
2023-04-07 18:59:49 +02:00
Yuri Sizov e4eac1c734
Merge pull request #74928 from BastiaanOlij/fix_typo_pose_orientation
Fix typo in OpenXR pose orientation check
2023-03-29 16:24:12 +02:00
Yuri Sizov d20c520d96
Merge pull request #74848 from BastiaanOlij/add_xr_system_info
Add a get_system_info method to XRInterface
2023-03-25 15:07:51 +01:00
Yuri Sizov dd8841a8ec
Merge pull request #74892 from BastiaanOlij/fix_hw_srgb_conversion
XR: When an sRGB target is used, check hardware sRGB conversion
2023-03-16 11:59:50 +01:00
Bastiaan Olij a1a52c5ba1 XR: When an sRGB target is used, check hardware sRGB conversion 2023-03-16 17:20:51 +11:00
Yuri Sizov c981a305a5
Merge pull request #73144 from chutchinson/bug/openxr-init-alert-dialog
Replaced OpenXR operating system alert dialog with a warning log message
2023-03-15 14:07:05 +01:00
Bastiaan Olij e15358dc67 Fix incorrect HTC action map entries 2023-03-15 14:11:13 +11:00
Bastiaan Olij cdd9de28a8 Fix typo in OpenXR pose orientation check 2023-03-15 13:40:44 +11:00
Bastiaan Olij e31c2e4277 Add a get_system_info method to XRInterface 2023-03-15 13:11:48 +11:00
Zac Luzader d3b26b3261 OpenXR: Enable access to the Valve Index grip force sensing 2023-03-12 07:55:25 -06:00
Haoyu Qiu 03fcac3aa5 Fix various typos in the classref 2023-03-09 14:56:23 +08:00
Rémi Verschelde 1c1524a651
Bump version to 4.1-dev
Can't stop, won't stop, they said, huh?
2023-03-01 01:44:37 +01:00
Malcolm Nixon d91e75b6f7 Added render target size multiplier option.
Fix formatting
2023-02-18 10:58:06 -05:00
Chris Hutchinson cb8e919243 Replaced operating system alert dialog with a warning log message,
toggled by a project setting.
Fixes #73141
2023-02-13 18:42:43 -05:00
Rémi Verschelde 8ef01ee5df
Merge pull request #72604 from rbessems/rbessems/env_blend_mode
Add XR Environment Blend Mode Support
2023-02-03 06:24:30 +01:00
Ron Bessems d7d171c45c Add XR Environment Blend Mode Support 2023-02-02 12:18:42 -05:00
Ron Bessems e78088cc3a Add Magic Leap 2 OpenXR Interaction Profile 2023-02-02 06:45:43 -05:00
Bastiaan Olij d3ec17e9ae Added methods to OpenXR interface to set which action sets are active 2023-01-31 10:20:19 +11:00
Rémi Verschelde 5b1df48c6c
Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +01:00
Rémi Verschelde 822edfdb40
Merge pull request #71708 from dsnopek/openxr-opengl-steamvr-2
Get OpenXR with OpenGL working on SteamVR
2023-01-20 08:50:10 +01:00
David Snopek 481369760b Add depth and color formats to get OpenXR with OpenGL working on SteamVR 2023-01-19 21:22:34 -06:00
Rémi Verschelde bcb57b42f6
Merge pull request #71450 from BastiaanOlij/fix_openxr_init_failure
Fixes issue where failed start of OpenXR causes issues
2023-01-19 10:08:50 +01:00
kobewi b58111588a Add EditorUndoRedoManager singleton 2023-01-16 01:11:52 +01:00
Bastiaan Olij 909ec66ca3 Fixes issue where failed start of OpenXR causes issues 2023-01-15 16:57:42 +11:00
Rémi Verschelde dd1b3ff089
Merge pull request #71224 from rsjtdrjgfuzkfg/openxr-opengl
OpenXR: Do not use SRGB swapchains with OpenGL
2023-01-12 09:07:46 +01:00
rsjtdrjgfuzkfg 17a957e214 OpenXR: Do not use SRGB swapchains with OpenGL
This commit removes SRGB swapchain options for use with OpenGL, to avoid
the hardware doing an additional SRGB conversion and thus causing colors
to differ from other rendering paths.
2023-01-11 15:47:53 +01:00
rsjtdrjgfuzkfg b51acac638 OpenXR: Fix initialization warning on Android
This commit adds proper checking for XR_KHR_loader_init support and
fixes the warning regarding missing extensions on Android to only appear
if neither XR_KHR_loader_init nor XR_KHR_loader_init_android are
supported by the runtime.
2023-01-11 15:00:22 +01:00
Rémi Verschelde 62b023ecd3
Merge pull request #70167 from rsjtdrjgfuzkfg/pico
OpenXR: Add Pico controller profile
2023-01-11 09:49:16 +01:00
Rémi Verschelde 6a86dfad29
Fix typos with codespell
Also includes #71080.

Co-authored-by: Psychpsyo <60073468+Psychpsyo@users.noreply.github.com>
2023-01-09 08:39:07 +01:00
rsjtdrjgfuzkfg e6370a45d8 OpenXR: Add preliminary Pico controller profile
This commit adds the Pico controller used in the Pico 4 as implemented
in current versions of the OpenXR runtime on the device itself. Note
that the extension and paths used in this commit might become obsolete
once there is official support for the Pico 4 in the OpenXR standard.
2023-01-06 14:02:41 +01:00
Rémi Verschelde d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Bastiaan Olij b6550c46ee Removed member variables from OpenXRExtensionWrapper
Made extension container in OpenXRAPI static
Moved controller meta data into extensions where applicable
2023-01-04 11:34:58 +11:00
Bastiaan Olij b5e205a57c Fix missing undo/redo object and issue with removing actions 2022-12-19 19:35:06 +11:00
rsjtdrjgfuzkfg 20c192cc2d OpenXR: fix casts and loop in action map editor
This commit replaces potentially unsafe static casts with
Object::cast_to and fixes the order in which UI elements are looped over
when removing controls. This fixes crashes and wrong data being
displayed in the OpenXR action map editor when saving or resetting
action maps.
2022-12-16 21:32:43 +01:00
Rémi Verschelde 346efd29e0
Fix typos with codespell 2022-12-15 12:24:08 +01:00
Rémi Verschelde cd855f6516
Merge pull request #68528 from BastiaanOlij/openxr_actionmap_changes
Various fixes for OpenXR action map meta data and editing
2022-12-13 10:16:19 +01:00
Rémi Verschelde 62f7f378d4
Merge pull request #69690 from BastiaanOlij/display_refresh_type
Fix property type for OpenXR display refresh rate
2022-12-07 13:25:48 +01:00