Unable to create fullscreen window at native resolution (unusual 8k monochrome display)

I have a Windows PC with an unusual 8k monochrome display attached. Windows is driving it at 2560x4320px (the RGB subpixels are full monochrome pixels). Everything is set up with manual timings in the NVIDIA Control Panel.

glfwGetVideoMode reports the correct, current mode of 2560x4320. But glfwGetVideoModes does not list this mode as one of the available options.

I tried following the “windowed full screen” example here: GLFW: Window guide

But it doesn’t use the correct mode (it uses 3840x2160px).

Any ideas or pointers on how I can create a full screen window with the proper resolution?

Here are some screenshots showing the NVIDIA control panel, the modes listed by GLFW, and the modes listed by Windows (nevermind I can only attach one image because I’m a new user):

And here is my relevant code:

monitor = glfw.get_monitors()[1]

mode = glfw.get_video_mode(monitor)

glfw.window_hint(glfw.RED_BITS, mode.bits.red)
glfw.window_hint(glfw.GREEN_BITS, mode.bits.green)
glfw.window_hint(glfw.BLUE_BITS, mode.bits.blue)
glfw.window_hint(glfw.REFRESH_RATE, mode.refresh_rate)

glfw.window_hint(glfw.CONTEXT_VERSION_MAJOR, 3)
glfw.window_hint(glfw.CONTEXT_VERSION_MINOR, 3)
glfw.window_hint(glfw.OPENGL_PROFILE, glfw.OPENGL_CORE_PROFILE)
glfw.window_hint(glfw.OPENGL_FORWARD_COMPAT, 1)

window = glfw.create_window(mode.size.width, mode.size.height, "Title", monitor, None)


It looks like I can mostly get I want with:

glfw.window_hint(glfw.DECORATED, 0)
glfw.window_hint(glfw.MAXIMIZED, 1)

But I’m not sure how to guarantee that this window will be created on the desired monitor.

I’d still like to know why the original attempt isn’t workable.

It would be a good start to first try the test program monitors.c from the latest source on Github if you can.

If that doesn’t show the mode, then it’s possible this is a bug in _glfwGetVideoModesWin32 which only shows up when you have this particular monitor/configuration (which is fairly unusual by the sounds).

If you are able to build from source and can debug the code, set a breakpoint here:

Calling glfwGetVideoModes will then enable you to view the value of dm which holds the returned enumerated values from EnumDisplaySettingsW. It’s possible the 2560x4320 mode is being returned but then ignored by either the dm.dmBitsPerPel < 15 test (line 407), the _glfwCompareVideoModes test (line 420 followed by 425), or the ChangeDisplaySettingsExW() != DISP_CHANGE_SUCCESSFUL test (line 431).

If you are able to debug this and share what happened it will help with finding out if there is a bug and how to fix it.

Let me know if you can’t do this and I’ll think of another approach to investigating.

Thanks for the excellent information. I don’t have a build system set up on this Windows machine yet, so some of this might take some time to debug.

Let me know if you need help - I could create a test program which outputs the essential information.