diff options
author | David Snopek <dsnopek@gmail.com> | 2022-12-04 17:47:10 -0600 |
---|---|---|
committer | David Snopek <dsnopek@gmail.com> | 2023-01-19 21:22:34 -0600 |
commit | 481369760bf694dd425e366b91db4034ba431868 (patch) | |
tree | c6ec36b018bdc2d88e7ac6433f7185ca65d1ad0b /modules/openxr | |
parent | d93b66ad4d6b1dae42cc318c16224d03bd1a1472 (diff) |
Add depth and color formats to get OpenXR with OpenGL working on SteamVR
Diffstat (limited to 'modules/openxr')
-rw-r--r-- | modules/openxr/extensions/openxr_opengl_extension.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/openxr/extensions/openxr_opengl_extension.cpp b/modules/openxr/extensions/openxr_opengl_extension.cpp index 6ce8f0805f..0d201161f1 100644 --- a/modules/openxr/extensions/openxr_opengl_extension.cpp +++ b/modules/openxr/extensions/openxr_opengl_extension.cpp @@ -158,12 +158,14 @@ void *OpenXROpenGLExtension::set_session_create_and_get_next_pointer(void *p_nex void OpenXROpenGLExtension::get_usable_swapchain_formats(Vector<int64_t> &p_usable_swap_chains) { p_usable_swap_chains.push_back(GL_RGBA8); + p_usable_swap_chains.push_back(GL_SRGB8_ALPHA8); } void OpenXROpenGLExtension::get_usable_depth_formats(Vector<int64_t> &p_usable_depth_formats) { p_usable_depth_formats.push_back(GL_DEPTH_COMPONENT32F); p_usable_depth_formats.push_back(GL_DEPTH24_STENCIL8); p_usable_depth_formats.push_back(GL_DEPTH32F_STENCIL8); + p_usable_depth_formats.push_back(GL_DEPTH_COMPONENT24); } bool OpenXROpenGLExtension::get_swapchain_image_data(XrSwapchain p_swapchain, int64_t p_swapchain_format, uint32_t p_width, uint32_t p_height, uint32_t p_sample_count, uint32_t p_array_size, void **r_swapchain_graphics_data) { |