LordOfDragons / dragengine

Drag[en]gine Game Engine
MIT License
70 stars 6 forks source link

Unsupported Swapchain formats on Oculus VR runtime #16

Closed LordOfDragons closed 1 year ago

LordOfDragons commented 1 year ago

Oculus VR runtime provides this list of supported swapchain texture formats:

II [OpenXR] [2023-03-13 14:23:45] Enumerate Swapchain Formats:
II [OpenXR] [2023-03-13 14:23:45] - 32856 (0x8058)
II [OpenXR] [2023-03-13 14:23:45] - 33189 (0x81a5)
II [OpenXR] [2023-03-13 14:23:45] - 34843 (0x881b)
II [OpenXR] [2023-03-13 14:23:45] - 35056 (0x88f0)
II [OpenXR] [2023-03-13 14:23:45] - 35898 (0x8c3a)
II [OpenXR] [2023-03-13 14:23:45] - 35907 (0x8c43)
II [OpenXR] [2023-03-13 14:23:45] - 36012 (0x8cac)
II [OpenXR] [2023-03-13 14:23:45] - 36013 (0x8cad)
EE [OpenXR] [2023-03-13 14:23:45] Exception: InvalidAction
EE [OpenXR] [2023-03-13 14:23:45] Description: XR_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED
EE [OpenXR] [2023-03-13 14:23:45] Source File: src/modules/vr/openxr/src/deoxrSwapchain.cpp
EE [OpenXR] [2023-03-13 14:23:45] Source Line: 71

Drag[en]gine supports right now only "34842 (0x881a) => GL_RGBA16F", which is the most common format. Supporting other formats improves compatibility with VR runtimes not able to accept this format.

The closest from the list above would be "34843 (0x881b" which is "GL_RGB16F". Pretty much not using the alpha component. Should require moderate code changes to support.