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

WebGLRenderStates: Avoid multiple lookups in WebGLRenderStates.get #24534

Merged
merged 1 commit into from
Aug 24, 2022
Merged

WebGLRenderStates: Avoid multiple lookups in WebGLRenderStates.get #24534

merged 1 commit into from
Aug 24, 2022

Conversation

Degubi
Copy link
Contributor

@Degubi Degubi commented Aug 24, 2022

Related issue: #24457

Description

Remove the multiple renderStates WeakMap accesses in WebGLRenderStates.get
WebGLRenderStates.get gets called in WebGLRenderer.compile & WebGLRenderer.render, so it is recommended to only do the lookup once.

@mrdoob mrdoob added this to the r144 milestone Aug 24, 2022
@mrdoob mrdoob merged commit 8a36b63 into mrdoob:dev Aug 24, 2022
@mrdoob
Copy link
Owner

mrdoob commented Aug 24, 2022

Thanks!

@Degubi Degubi deleted the webglenderstates_multiple_lookup branch August 24, 2022 17:19
abernier pushed a commit to abernier/three.js that referenced this pull request Sep 16, 2022
snagy pushed a commit to snagy/three.js-1 that referenced this pull request Sep 21, 2022
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.

2 participants