Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Cannot successfully use OpenXR with OpenGL #546

Closed
farmboy0 opened this issue Nov 5, 2022 · 8 comments
Closed

[BUG] Cannot successfully use OpenXR with OpenGL #546

farmboy0 opened this issue Nov 5, 2022 · 8 comments

Comments

@farmboy0
Copy link

farmboy0 commented Nov 5, 2022

Describe the bug
I tried 3 different OpenGL+OpenXR samples that all fail to correctly run.
The samples tried are the following:

  1. OpenXR-SDK's hello_xr with OpenGL as graphics parameter set
  2. LWJGL3's HelloOpenXRGL demo
  3. https://github.com/ChatImproVR/rust-opengl-openxr-example

The first 2 listed are suffering from the fact that they are not looking for
GL_SRGB8 or GL_SRGB8_ALPHA8 which are the only xolor formats
SteamVR's EnumerateSwapchainFormats will return.
But that it is easily fixed but will not make the samples run completely either.

To Reproduce
Steps to reproduce the behavior:

  1. Run any of the samples listed above, fixing color format selection like described

Expected behavior
I expect the samples to run successfully or at least produce errors why they cant.

System Information (please complete the following information):

  • Distribution: [Arch/Manjaro/Ubuntu/etc.] Gentoo
  • SteamVR version: [E.g. 1.7.2] 1.24
  • Steam client version: [build number or date] 19.10.2022 00:56:44
  • Opted into Steam client beta?: [Yes/No] No
  • Graphics driver version: [run nvidia-settings or vulkaninfo | grep driverInfo: Mesa 22.2.2
  • Gist for SteamVR System Information: [See instructions] https://gist.github.com/farmboy0/16f79f8c08e6062bb1cf5365963499ce

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
xrclient_hello_xr.txt
xrclient_java.txt
xrclient_ugly_gl.txt

If there are OpenGL samples that can successfully run I would appreciate it a lot if you could provide them.

Note: Commenters who are also experiencing this issue are encouraged to include the "System Information" section in their replies.

@farmboy0 farmboy0 added the bug label Nov 5, 2022
@ChristophHaag
Copy link
Contributor

There's this bug #421

In https://gitlab.freedesktop.org/monado/demos/openxr-simple-example I worked around it. godot_openxr does too.

@farmboy0
Copy link
Author

farmboy0 commented Nov 7, 2022

@ChristophHaag Thanks alot

@cnlohr
Copy link

cnlohr commented Nov 9, 2022

What version of SteamVR are you using? We are in the process of pushing a fix for newer SteamVR.

@farmboy0
Copy link
Author

Im on beta channel so currently running 1.25.1

@cnlohr
Copy link

cnlohr commented Nov 11, 2022

@farmboy0, our fix should be in 1.25 (It was a bug from 1.16-1.24). We are now doing the following:

		m_glxDisplayToRestore = glXGetCurrentDisplay();
		m_glxContextToRestore = glXGetCurrentContext();
		m_glxDrawableToRestore = glXGetCurrentDrawable();
		if( m_glxDisplayToRestore != m_xDisplay || m_glxDrawable != m_glxDrawableToRestore || m_glxContextToRestore != m_glxContext )
			glXMakeCurrent( m_xDisplay, m_glxDrawable, m_glxContext );

Can you confirm that you still need to perform the glXMakeCurrent command in your app using the current beta?

@farmboy0
Copy link
Author

I can confirm that

  1. hello_xr works partially, it renders to the headset but the desktop window shows only artifacts.
  2. The LWJGL3 sample works fine headset and desktop window
  3. The rust sample doesnt run anymore with some weird error, thats a cargo error, nothing to do with OpenXR

@ChristophHaag
Copy link
Contributor

hello_xr works partially, it renders to the headset but the desktop window shows only artifacts.

fyi this is normal, the hello_xr desktop window doesn't have any output

@farmboy0
Copy link
Author

farmboy0 commented Dec 1, 2022

I consider this issue to be resolved, I have no problems anymore using OpenGL with OpenXR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants