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

WebGLRenderer: Fix render state management in compile(). #22220

Merged
merged 1 commit into from
Jul 29, 2021

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jul 29, 2021

Related issue: Fixed #22217.

Description

The integration of PMREMGenerator actually revealed a bug in WebGLRenderer.compile(). The current render state was not correctly added to the internal stack which breaks nested calls of render().

@mrdoob
Copy link
Owner

mrdoob commented Jul 29, 2021

Oh! I guess this deserves 0.131.1?

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Jul 29, 2021

I would say yes. The bug becomes apparent because the call of compile() triggers the PMREM generation. So it is in some sense a regression.

But to be clear the runtime error would also appear in other use cases. I guess compile() is not used that much and hence it was not reported so far.

@mrdoob
Copy link
Owner

mrdoob commented Jul 29, 2021

Okay! I'll release it tomorrow.

@mrdoob mrdoob added this to the r131 milestone Jul 29, 2021
@mrdoob mrdoob merged commit 940816f into mrdoob:dev Jul 29, 2021
@mrdoob
Copy link
Owner

mrdoob commented Jul 29, 2021

Thanks!

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.

renderer.compile throws "Cannot read property 'state' of null"
2 participants