-
Notifications
You must be signed in to change notification settings - Fork 175
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
Scoped binds #1633
Comments
The biggest difficulty is accessing the |
First naive implementation looks kinda bad, not finished enough to get into a PR. let mut bind = renderer.bind(buffer).map_err(Error::Rendering)?;
let renderer = bind.renderer().unwrap();
let res = self.render_output_internal(renderer, age, elements, clear_color)?;
bind.unbind().map(move |_| res).map_err(Error::Rendering) Since the |
See #1637 |
Mhm, seems to do exactly that Well I guess this solves it, thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I already spoke about this back in the matrix channel but I didn't have the time to actually try to implement this out.
The main idea is to give binds a lifetime, something similar to:
Implementation is open to discussion
This is also needed as part of my rendering tests for blurring, as I need to (on
Element::draw
) bind a texture, render to it, and then bind back whatever I need to render to on the output surface. While accessingGlesRenderer::target
would fix this issue for me, I'd rather implement this better interface too.The text was updated successfully, but these errors were encountered: