LearnOpenTK icon indicating copy to clipboard operation
LearnOpenTK copied to clipboard

OnResize logic isn't correct

Open NvC-DmN-CH opened this issue 1 year ago • 2 comments

https://github.com/opentk/LearnOpenTK/blob/6825eba6a99e097236eb17b768f59c157e6dadde/Chapter1/2-HelloTriangle/Window.cs#L185

I set the window to (1280, 720) but the GL.Viewport is actually set to: image

When I used ClientRectangle.Size.X and ClientRectangle.Size.Y it became proper: image

NvC-DmN-CH avatar Jul 18 '24 16:07 NvC-DmN-CH

The correct property is actually FramebufferSize, others will break on macOS. Will fix next time I do some work on these tutorials (if no one else has made a PR)

NogginBops avatar Jul 18 '24 18:07 NogginBops

Oh ok, thank you!

NvC-DmN-CH avatar Jul 22 '24 20:07 NvC-DmN-CH