PistonDevelopers / glutin_window

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

Allow use of opengles #154

Closed OptimisticPeach closed 5 years ago

OptimisticPeach commented 5 years ago

Use GlRequest::GlThenGles rather than using Specific: This would allow people to use opengles with glutin_window (Which I have done) without having to modify a local clone. change this:

.with_gl(GlRequest::Specific(Api::OpenGl, (major as u8, minor as u8)))

To something more like this:

.with_gl(GlRequest::GlThenGles {
    opengl_version: (major as u8, minor as u8),
    opengles_version: (major as u8, minor as u8),
})

It doesn't matter if the user chooses opengl or opengles, because this would support both!

bvssvni commented 5 years ago

I think this is a good idea and we should do what you suggested.