When filling in the XrSwapchainCreateInfo at line 363 he puts a value for format, DXGI_FORMAT_R8G8B8A8_UNORM which equals to 28 according to DXGI_FORMAT enumerations.
If I am using OpenGL, what do I put in here? I cant use GL enums because they dont return int64_t values. I have also tried to use their corresponding OpenGL bindings values, but I always get XrResult = -26 (XR_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED)
For example, I tried both 6408 (GL_RGBA) and 3553 (GL_TEXTURE_2D).
What number does it expect here with OpenGL? And what are my choices?
That’s new user spam prevention. Keep reading+posting and you’ll be allowed to post links in no time.
That reasoning doesn’t follow. This type just needs to encompass format types across all supported graphics APIs.
As haagch indicated, in OpenGL these are OpenGL internal formats (sometimes referred to as OpenGL texel formats). Following the man pages points this out.
Thanks alot for the answers guys. I actually tried XrEnumerateSwapchainFormats yesterday, but didnt get anything back. I probably wrote something wrong
But your answers confirmed I must have been doing something wrong, and by reimplementing the enumerate function call I got my formats
In case anyone else reads this post for information, here is my code: