Skip to content

gles: Define a GlesContext, with a CurrentGlesContext guard #1750

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

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Jun 2, 2025

Still working through issues to use this everywhere. The goal is to prevent things like #1748.

In particular, GlesFrame needs to be updated to hold a CurrentGlesContext. Things like blit_to/bllit_from are a little funny here since they call a function that makes a different context current, then restore the context.

@ids1024
Copy link
Member Author

ids1024 commented Jun 2, 2025

I guess EGLContext::wait() should also require a current context.

Edit: For modularity the egl module could define an ActiveContext trait, and require that for create/wait instead of the requirement being in the doc comment but not enforced in any way.

ids1024 added 4 commits June 25, 2025 12:02
Start using `GlesContext` helper

Use GlesContext helper in more places

import_egl_image() needs to take `&mut self`

Use context helper more

WIP

WIP

WIP

WIP

TODO call_without_current

WIP
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.

1 participant