-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
WebGLRenderer: Release cache at the end of .render(). #14946
Conversation
Say that we're rendering a scene with just one object and one material... |
What does "binding calls" mean by in this context? |
Ah, binding buffer, isn't it? Even in the current impl it binds every frame for a scene with one object and one material because it releases the cache at the beginning of |
@mrdoob This PR is about when a cache or cache-like variables should be resetted. Similar like the reset of render states and lists, the mentioned code block should be moved at the end of |
@Mugen87 Is it safe to merge? |
I guess there is only one way to know... 🤓 |
Thanks! |
I think it's better to release
_currentCamera
at the end ofWebGLRenderer
's.render()
. Unless doing this, disposedcamera
resource won't be released until next.render()
call becauserenderer
keeps a reference tocamera
.