opengl_graphics
opengl_graphics copied to clipboard
Move here GL init from window back-ends.
See PistonDevelopers/window#56
- [ ] Add second argument (
&mut WwhereW: OpenGLWindow) toGlGraphics::newand add GL init inside it - [ ] Remove GL init from window back-ends:
- [ ] sdl2_window
- [ ] glfw_window
- [ ] glutin_window
There is a problem when you are using OpenGL for other things than 2D, or if you are using different shaders for 2D. I'd like to separate this step from the creation of Gl.
I don't like run-time argument here, because:
- you always know in advance
- no need to link and compile multiple instances of gl-rs
@kvark What do you mean with "run-time argument"?
You proposed to add a switch to the WindowSettings here. This would be a run-time switch, so all the gl is still going to be linked and compiled. I vote for either removal, or making it a cargo configuration flag (compile switch).