Commit Graph

61 Commits

Author SHA1 Message Date
Yuri Sizov 52784188bf
Merge pull request #78817 from BastiaanOlij/fix_startup_issue_hand_tracking
Fix issue with accessing hand tracking without timing info
2023-07-17 09:59:51 +02:00
Yuri Sizov 661c3954a6 Merge pull request #73443 from akien-mga/unbundle-openxr
Allow unbundling OpenXR (for Linux distros)
2023-07-12 17:15:25 +02:00
Bastiaan Olij 72bd997fe8 Fix issue with accessing hand tracking without timing info 2023-06-29 10:05:39 +10: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 34a07b81ae
Allow unbundling OpenXR (for Linux distros)
Copy XrMatrix4x4f_CreateProjectionFov to our OpenXRUtil, instead of relying
on a private header.
2023-06-16 16:25:04 +02: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
Bastiaan Olij a1a52c5ba1 XR: When an sRGB target is used, check hardware sRGB conversion 2023-03-16 17:20:51 +11:00
Bastiaan Olij e15358dc67 Fix incorrect HTC action map entries 2023-03-15 14:11:13 +11:00
Ron Bessems e78088cc3a Add Magic Leap 2 OpenXR Interaction Profile 2023-02-02 06:45:43 -05: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 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
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
David Snopek 61cec0b023 Clean up DisplayServerAndroid::window_get_native_handle() with the GLES3 renderer 2022-12-04 13:07:51 -06:00
David Snopek aa5b42946c Fix OpenXR on the Meta Quest: XR_KHR_loader_init_android is not reported as available (but it works anyway) 2022-11-29 20:45:01 -06:00
clayjohn 9141984e7e Enable GLES3 on Android
Add necessary build flags and switch from using a
GLES2 context to a GLES3 one.

This also enables building for OpenXR

Co-authored-by: m4gr3d <fhuyakou@gmail.com>
Co-authored-by: dsnopek <dsnopek@gmail.com>
2022-11-29 14:18:24 -08:00
Bastiaan Olij 96bbdf7249 Various fixes for OpenXR action map meta data and editing 2022-11-25 20:26:30 +11:00
Jens Nolte 67f31f571e Fix GLAD-related build problems on Linux
- Use gl.h provided by GLAD in the OpenXR module
- Use non-EXT variants of some OpenGL defines
- Remove libGL-related code paths
2022-11-25 02:52:17 +01:00
Rémi Verschelde c39c251255
Merge pull request #68023 from rsjtdrjgfuzkfg/pico
Partial support for Pico 4
2022-11-24 10:43:15 +01:00
Markus Sauermann 28af870750 Code simplifications found by cppcheck
They are based on:
- Boolean arithmetic simplifications
- setting variables that are not accessed
- constant variables
2022-11-21 08:43:36 +01:00
David Snopek c767cc16ea [openxr] Remove unnecessary fallbacks for native handles on X11 2022-11-09 08:09:07 -06:00
David Snopek 23603e409c Add support for OpenGL to OpenXR 2022-11-08 18:47:11 -06:00
rsjtdrjgfuzkfg 4243b85990 OpenXR: support XR_KHR_android_create_instance
This commit adds support for the OpenXR extension
XR_KHR_android_create_instance, which seems to be required on Pico
devices.
2022-11-04 01:57:48 +01:00
Rémi Verschelde f7c611ab71
Style: Misc docs and comment style and language fixes
- Removed empty paragraphs in XML.
- Consistently use bold style for "Example:", on a new line.
- Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`).
- Fix invalid usage of backticks for inline code in BBCode.
- Fix some American/British English spelling inconsistencies.
- Other minor fixes spotted along the way, including typo fixes with codespell.
- Don't specify `@GlobalScope` for `enum` and `constant`.
2022-11-02 19:01:18 +01:00
Bastiaan Olij 19f9fe1dec Filter out HTC OpenXR paths based on extension 2022-10-19 00:09:54 +11:00
Bastiaan Olij e14717bb2e Adding support for the OpenXR Display Refresh Rate extension 2022-10-10 20:41:46 +11:00
Rémi Verschelde 3a2b0ab73d Merge pull request #66898 from aaronfranke/proj-mat-columns
Rename Projection `matrix` to `columns`
2022-10-05 08:35:26 +02:00
Bastiaan Olij c7656978ba Adding getters to RenderTarget and implementing override functionality for XR 2022-10-05 11:37:49 +11:00
Aaron Franke 2cea42cc7f
Rename Projection `matrix` to `columns` 2022-10-04 12:34:19 -05:00
Gabor Koncz 72203a4da4 Add Passthrough extension wrapper 2022-09-27 12:26:53 +02:00
Rémi Verschelde 809927862b Merge pull request #66282 from BastiaanOlij/openxr_palm_pose
Add OpenXR palm pose extension support
2022-09-27 10:03:56 +02:00
Bastiaan Olij 23d32c0e16 Adding OpenXR hand tracking support 2022-09-26 19:47:06 +10:00
Gergely Kis d5445c25a6 Dynamic loading of OpenXR Loader on Android
This change implements dynamic loading of the OpenXR Loader library
on Android. If an OpenXR Loader library is not found,
Godot will still function with OpenXR disabled.

Also, on every platform, the OpenXR symbols are resolved at runtime
using xrGetInstanceProcAddr.

On Windows and Linux the OpenXR loader is included in the main
engine binary.

On Android, the OpenXR Loader is not built with the engine. Separately
distributed Android plugins will be provided with the correct loader
library for each device.

Co-authored-by: Gábor Pál Korom <gabor.p.korom@migeran.com>
Co-authored-by: Gábor Koncz <gabor.koncz@migeran.com>
2022-09-24 13:57:03 +02:00
Bastiaan Olij 6da6e1690e Add OpenXR palm pose extension support 2022-09-23 13:20:12 +10:00
Rémi Verschelde 90019676b0 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
reduz 455c06ecd4 Implement Vector4, Vector4i, Projection
Implement built-in classes Vector4, Vector4i and Projection.

* Two versions of Vector4 (float and integer).
* A Projection class, which is a 4x4 matrix specialized in projection types.

These types have been requested for a long time, but given they were very corner case they were not added before.
Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity.

**Q**: Why Projection and not Matrix4?
**A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
2022-07-23 14:00:01 +02:00
Bastiaan Olij ecfcfd97fa Split dependency logic
Split FOG
Split visibility notifier
Final cleanup of storage classes
2022-06-28 00:10:29 +10:00
Bastiaan Olij 95f75b232f Adding HTC tracker support 2022-06-16 16:52:13 +10:00
reduz 746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00