high dpi window dragged to low dpi monitor |
high dpi window dragged to low dpi monitor |
Alex Szpakowski
Guest
|
In OS X when a high-dpi capable OpenGL window moves from a high-dpi monitor to a low-dpi monitor (or vice versa), the dimensions of the window’s main framebuffer are changed. You’ll need to handle the change (by calling glViewport with the correct dimensions etc. if you’re using OpenGL, and by recreating or re-scaling content as necessary.)
SDL 2.0.4 sends a window resize event when that occurs, but unfortunately SDL 2.0.3 and older don’t send any events so you’ll either need up update SDL or compare the output of SDL_GL_GetDrawableSize (or SDL_GetRenderOutputSize if you’re using SDL_Render) every frame.
|
|||||||||||||
|
divad
|
@Alex great thanks. Is 2.0.3 the latest stable version? https://www.libsdl.org/download-2.0.php seems to imply that. I may just wait until 2.0.4 is deemed "stable" and handle it then.
|
|||||||||||
|
high dpi window dragged to low dpi monitor |
Alex Szpakowski
Guest
|
2.0.3 is the most recent stable release, but 2.0.4 is right around the corner – it’s currently at release candidate 2. You can download it from http://www.libsdl.org/tmp/download-2.0.php
SDL 2.0.4 has a ton of fixes since 2.0.3, so it’s generally more stable and reliable even though it’s not quite released yet.
|
|||||||||||||
|