Skip to content
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

Add Make current to GraphicsContext #35

Merged
merged 2 commits into from Jul 1, 2014
Merged

Add Make current to GraphicsContext #35

merged 2 commits into from Jul 1, 2014

Conversation

ghost
Copy link

@ghost ghost commented Jun 30, 2014

Simple solution for #30. Adds the make_current command to the GraphicsContext and exposes it to Server object so that the api user can select the thread that they wish to make the graphics context valid on.

@kvark
Copy link
Member

kvark commented Jun 30, 2014

Looks good to me. The only problem is that we loose safety when the user forgets to call make_current. If that doesn't block you, I'd prefer to wait for @bjz to review it as well.

@brendanzab
Copy link
Contributor

Restarting the travis build.

@brendanzab
Copy link
Contributor

I'm still not happy with how the context/graphics API stuff is structured - it will need a rethink.

The original thought behind keeping the server on the main thread was because I thought OpenGL wasn't threadsafe. But this could be too limiting. Encoding this into the type system and making it safe is hard :(

What use case is this blocking you on @csherratt?

@kvark
Copy link
Member

kvark commented Jun 30, 2014

I believe we should accept this, and start looking for ways to add safety at either run-time or compile time in regards to GL task movement. The fact that we don't know how to safely do it doesn't mean we should block it completely.

brendanzab added a commit that referenced this pull request Jul 1, 2014
Add Make current to GraphicsContext
@brendanzab brendanzab merged commit 1cfe824 into gfx-rs:master Jul 1, 2014
@brendanzab
Copy link
Contributor

@kvark Agreed. Merged.

kvark added a commit to kvark/gfx that referenced this pull request Jun 14, 2015
Implemented support for multiple factories
adamnemecek pushed a commit to adamnemecek/gfx that referenced this pull request Apr 1, 2021
35: Update to current version of gfx-hal r=kvark a=porky11

I'll also push the transition to rust 2018 and some cleanup soon

Co-authored-by: porky11 <krapohl.f@gmx.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants