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

Why 2 dummy windows for GL Context creation? (Windows) #53

Closed lunabunn closed 3 years ago

lunabunn commented 3 years ago

https://github.com/kettle11/kapp/blob/2b236c6b53d042afed6cdcb448121eb905fca624/gl_context/src/windows/mod.rs#L294-L378

Why exactly are we creating a second dummy window here?

kettle11 commented 3 years ago

This requires a bit more research, but I'll try to get to it soon. I do remember thinking it had to be this way, but it was a while ago now and maybe I was just tired. 😅

lunabunn commented 3 years ago

Upon some reading through & fiddling with the code, pretty sure I just wasn't thinking straight. With the current implementation, because you only set the window after you create the context, you need to create a new window to set the correct PFD on. I'll close this 😅