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

no window rendered running HelloOpenXRGL sample #1031

Open
farmboy0 opened this issue Dec 21, 2024 · 6 comments
Open

no window rendered running HelloOpenXRGL sample #1031

farmboy0 opened this issue Dec 21, 2024 · 6 comments

Comments

@farmboy0
Copy link

Version

3.3.5

Platform

Linux x64

JDK

GraalVM 17

Module

GLFW, OpenXR, OpenGL

Bug description

I tried running the HelloOpenXRGL on linux with LWJGL 3.3.5 but there are 2 problems with it.

  1. you need to add GL21.GL_SRGB8 to the desiredSwapchainFormats at line 600-603
  2. The real problem I see though is that the 2D window the sample opens is empty on X11 and not even showing the window border on wayland.

Im running Gentoo Linux with GLFW 3.4

Stacktrace or crash log output

No response

@knokko
Copy link
Contributor

knokko commented Dec 23, 2024

It has been a long time since I wrote this sample, and I don't really use OpenGL nowadays. Could you elaborate point (1)? Why is it a good idea to add this desired swapchain format?

Regarding point (2), that is desired! I never wanted to create a window; I just want to render on the headset. But... creating an OpenGL context without creating a window is surprisingly hard, so the easiest way to do this, is by creating a small invisible window.

@farmboy0
Copy link
Author

The new format is one of the supported ones with SteamVr on linux, the others in the list arent.

@knokko
Copy link
Contributor

knokko commented Dec 28, 2024

Do you know the full list of formats supported by SteamVR?

@farmboy0
Copy link
Author

There are 5:
GL_SRGB8 35905 0x8c41
GL_SRGB8_ALPHA8 35907 0x8c43
GL_DEPTH_COMPONENT16 33189 0x81a5
GL_DEPTH_COMPONENT24 33190 0x81a6
GL_DEPTH_COMPONENT32F 36012 0x8cac

@farmboy0
Copy link
Author

As for the second point: No its not desired. If a window is programmed to show and render into it better be. Its not even desired to be able to create VR apps that have no window at all. There would be no way for the OS to determine the current window to send input events to.

@knokko
Copy link
Contributor

knokko commented Dec 29, 2024

There are 5: GL_SRGB8 35905 0x8c41 GL_SRGB8_ALPHA8 35907 0x8c43 GL_DEPTH_COMPONENT16 33189 0x81a5 GL_DEPTH_COMPONENT24 33190 0x81a6 GL_DEPTH_COMPONENT32F 36012 0x8cac

Ok, then I think that indeed GL_SRGB8 would be the best choice. Can you create a pull request for this? (I don't have the right dev environment at the moment, so it would be nice if you could do it.)

As for the second point: No its not desired. If a window is programmed to show and render into it better be. Its not even desired to be able to create VR apps that have no window at all. There would be no way for the OS to determine the current window to send input events to.

Well... I'm the one who wrote created this part of the sample, and it definitely was my intention to create this dummy window. Creating VR apps without window is my preferred option, and is exactly what HelloOpenXRVK does. I don't see the point in creating a window for VR applications since there is rarely anyone watching it: the player will see through the hmd anyway...

There would be no way for the OS to determine the current window to send input events to.

The OS doesn't need to send input events: when the player is in VR, there is usually no-one that uses the keyboard or mouse anyway. All VR-related input will be handled by the OpenXR runtime, and sent to the OpenXR input system.

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

No branches or pull requests

2 participants