Skip to content

no window rendered running HelloOpenXRGL sample #1031

Description

@farmboy0

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

Activity

  1. knokko commented on Dec 23, 2024

    @knokko
    Contributor

    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.

  2. farmboy0 commented on Dec 27, 2024

    @farmboy0
    Author

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

  3. knokko commented on Dec 28, 2024

    @knokko
    Contributor

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

  4. farmboy0 commented on Dec 28, 2024

    @farmboy0
    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

  5. farmboy0 commented on Dec 28, 2024

    @farmboy0
    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.

  6. knokko commented on Dec 29, 2024

    @knokko
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions