OpenTimelineIO / raven

Raven - OpenTimelineIO Viewer Application
Apache License 2.0
74 stars 15 forks source link

HIDPI on mac #5

Closed markreidvfx closed 1 year ago

markreidvfx commented 1 year ago

HIDPI in imgui is still a mess, if you have a monitors with different DPI's on mac, this happens when you move a window to the higher DPI display.

image

The easiest work around is to just disable retina framebuffers in glfw

glfwWindowHint(GLFW_COCOA_RETINA_FRAMEBUFFER, GL_FALSE);

I've gotten hidpi working somewhat smoothly on Windows in one of my branches. It's still a mess. glfw enables DPI awareness by default on Windows. I wish glfw had an equivalent hint for windows.

jminor commented 1 year ago

@markreidvfx I switched it to use the GLFW + Metal backends (see https://github.com/jminor/raven/commit/b653fc88407b49908e450919eec109664774ccb8 and subsequent changes) and this seems to be fixed now. That also future-proofs this vs Apple's plan to eventually drop support for OpenGL.

FYI, I left the GLFW + OpenGL build for use on Windows (though I haven't tested that since the change). I don't have access to a Windows machine with a high-dpi monitor, but if that has a similar issue, maybe we could try one of the more native Windows backends?

markreidvfx commented 1 year ago

I'll try and port it to the DirectX + win32 backends. That would fix a bunch of the glitchy window stuff that happens with viewports and OpenGL too.

jminor commented 1 year ago

I think this is working properly now. Let me know if you see any lingering problems.