-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow creating pure window context without GL init #56
Comments
Compile time flag sounds nice. |
I think we should remove GL init from window back-ends. It was added only for |
Oh that would be great! |
Alternative is to add a flag to |
@Potpourri Are you on IRC #rust-gamedev? |
This discussion got mixed up a bit between two issues. It seems that since Gfx uses a different library for gl, it makes sense with a Cargo feature like @kvark suggested. |
Ideally I would like to make it explicit in code what is happening. Easier to debug problems. |
I've tried overriding sdl2_window, removing the OpenGL initialization and measure the build time. No difference. On my machine, it takes a approximately 1 minute to build the gfx_cube example.
|
So far I have not experienced any problems with running Gfx and OpenGL side by side, so this seems to be an issue with 3.1. |
Todo list for window backends: |
When working with
gfx_device_gl
(maybeglium
too?), the GL function pointers are initialized twicegl::
namespacegfx_device_gl::create()
, using the internalgl
structThese seem to be in conflict sometimes (PistonDevelopers/piston-examples#200), not to mention the amount of wasted work, which slows down the start time.
I do realize that it might be simpler to add another init method for
gfx_device_gl
, but that goes against the safety guarantees ofgfx
. Besides, that would require all thegfx_device_gl
code to use the globalgl::
instead of a struct.Ideally, I'd like it to be a compile time flag for things that implement piston-window. Thus,
gfx_cube
example would compileglfw_window
(orsdl2_window
) in a "detached" state that doesn't touch OpenGL and only initializes GLFW (or SDL).The text was updated successfully, but these errors were encountered: