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

SDL backend can't create GL contexts on all of its supported platforms. #71

Open kettle11 opened 3 years ago

kettle11 commented 3 years ago

There needs to be a way to use SDL to create OpenGL contexts. Unfortunately that requires passing in an SDLWindow pointer to SDL. Presently kapp's GL context creation accepts RawWindowHandle which cannot store the SDLWindow pointer, so some other mechanism for passing around that pointer is needed.

Perhaps this indicates that GL context creation should be rolled into kapp directly to allow it more control? The advantages gained by a separate GL context creation crate are rather small.