Add GetOpenGLScaleFactor() to abstract OpenGL coordinates scaling
The fix for OpenGL coordinates when using high DPI in b134589cbb
(Fix
OpenGL samples when using HiDPI displays, 2019-08-06) did fix it for GTK
3 and macOS, but broke it for MSW and other platforms not using pixel
scaling, as window coordinates are the same as OpenGL ones there, while
GetContentScaleFactor() can still return values > 1 even on these
platforms.
Provide new GetOpenGLScaleFactor() function abstracting this platform
difference and use it in all OpenGL samples to make them work correctly
in high DPI under all platforms.
Closes https://github.com/wxWidgets/wxWidgets/pull/1944
Closes #17391.
This commit is contained in:
@@ -83,7 +83,7 @@ Changes in behaviour not resulting in compilation errors
|
||||
|
||||
- wxGLCanvas now uses physical pixels on high DPI displays under platforms
|
||||
where they're different from logical ones (wxGTK3, wxOSX). Multiply logical
|
||||
coordinates, e.g. returned by wxWindow::GetSize() by GetContentScaleFactor()
|
||||
coordinates, e.g. returned by wxWindow::GetSize() by GetOpenGLScaleFactor()
|
||||
before using them with OpenGL functions.
|
||||
|
||||
- wxGTK now uses wxID_NONE item ID for wxEVT_MENU_HIGHLIGHT events sent when
|
||||
|
Reference in New Issue
Block a user