Closed DigitalBox98 closed 6 months ago
When resizing on MacOS, the rendered objects are divided by 2.
The solution consists to use scale factor :
// Initialise the Scale Factor float scaleFactorX = 1.0f; float scaleFactorY = 1.0f;
And to identify it correctly on MacOS (2.0f on my Mac) during the OnLoad():
// Get the Scale Factor of the Monitor this.TryGetCurrentMonitorScale(out scaleFactorX, out scaleFactorY);
Then the OnResize() needs to use it :
GL.Viewport(0, 0, (int)(Size.X * scaleFactorX), (int)(Size.Y * scaleFactorY));
With this method, the window once resized is displaying correctly the object :
The proper solution here I think is to use the FramebufferSize property and OnFramebufferResize properties that are new in 4.8.2
FramebufferSize
OnFramebufferResize
When resizing on MacOS, the rendered objects are divided by 2.
The solution consists to use scale factor :
And to identify it correctly on MacOS (2.0f on my Mac) during the OnLoad():
Then the OnResize() needs to use it :
With this method, the window once resized is displaying correctly the object :