kettle11 / kapp

A pure Rust window and input library for Windows, Mac, and Web. (Work in progress)
Apache License 2.0
56 stars 4 forks source link

Viewport size should be set when binding a window to a GLContext #69

Open kettle11 opened 3 years ago

kettle11 commented 3 years ago

Right now the viewport will be an incorrect value when a window is bound to a GLContext.

On Windows this manifests as the viewport size being 0,0 when a window is bound, because the dummy window used to initialize the context had a size of 0,0.

A solution would be to get the window size and perform a call to viewport when the window is bound to the context.

This would mean that the window size would need to be queried and the "viewport" function would need to be loaded.