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:
@@ -100,7 +100,7 @@ public:
|
||||
|
||||
// implement wxGLCanvasBase methods
|
||||
virtual bool SwapBuffers() wxOVERRIDE;
|
||||
|
||||
virtual double GetOpenGLScaleFactor() const wxOVERRIDE;
|
||||
|
||||
// Mac-specific functions
|
||||
// ----------------------
|
||||
|
Reference in New Issue
Block a user