PistonDevelopers / glutin_window

A Piston window back-end using the Glutin library
MIT License
25 stars 40 forks source link

Add constructor for existing Glutin window #185

Closed adumbidiot closed 4 years ago

adumbidiot commented 4 years ago

Possibly closes #59

Adds and documents a constructor that allows the construction of a game window from an existing glutin WindowBuilder and Eventsloop. I chose to duplicate the code from the default constructor as this new constructor does not try to create a window without multi-sampling implicitly on failure.

In hindsight, this might not be enough to close #59 since this does not construct a game window from a pre-existing glutin window. I can expand/edit this PR if that is needed.

bvssvni commented 4 years ago

I think this is close enough to cover https://github.com/PistonDevelopers/glutin_window/issues/59. We can just reopen the issue if there is a need.

Merging.

bvssvni commented 4 years ago

Thanks!