Skip to content

Conversation

@literallylara
Copy link

@literallylara literallylara commented Jul 1, 2025

On my home server the primary screen is connected to a KVM and the secondary to my TV. With the standard settings (I assume it defaults to Vulkan then?) it renders a black screen on the secondary monitor. When compiled with SDL_WINDOW_OPENGL it works as expected.

I am starting flex-launcher via gamescope:

gamescope --hdr-enabled -W 1920 -H 1080 -O HDMI-A-2 -f -- flex-launcher

Possibly related: #45

@complexlogic
Copy link
Owner

The SDL Renderer API is just high level abstraction for lower level graphics APIs, including OpenGL and Vulkan. The flag SDL_WINDOW_OPENGL is really meant for if you are going to draw directly using OpenGL, and just need SDL to create the context for you.

When using the SDL Renderer API, you can set an environment variable SDL_RENDER_DRIVER to instruct SDL which underlying graphics API should be used. For example, to force the OpenGL renderer, you can run Flex Launcher like so:

SDL_RENDER_DRIVER=opengl flex-launcher

Please try that and let me know the result.

@literallylara
Copy link
Author

Hmm I see. Please excuse my lack of experience with SDL. The environment variable you suggested unfortunately did not seem to have any effect. Perhaps the issue lies with gamescope. Or perhaps there is a way to tell SDL which monitor/index to use. I will experiment some more when I find the time.

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

Successfully merging this pull request may close these issues.

2 participants