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

fix(webgl): Render pass parameter handling #2062

Merged
merged 1 commit into from
Apr 2, 2024
Merged

Conversation

Pessimistress
Copy link
Collaborator

Change List

  • WEBGLRenderPass.end(): popContextState already restores framebuffer binding to what it was before beginRenderPass(). Should not mutate global state.
  • WEBGLRenderPass.setParameters(): partially modify, not replace, glParameters

@@ -58,7 +55,7 @@ export class WEBGLRenderPass extends RenderPass {
* Maps RenderPass parameters to GL parameters
*/
setParameters(parameters: RenderPassParameters = {}): void {
const glParameters: GLParameters = {};
const glParameters: GLParameters = {...this.glParameters};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that only four specifically documented parameters can be changed after creation in a RenderPass (blend constant, stencil reference, scissor rect and viewport). Other parameters are frozen.

We should not be touching framebuffer, writeMask, stencilMask etc here.

@Pessimistress Pessimistress merged commit eac9e4a into master Apr 2, 2024
2 checks passed
@Pessimistress Pessimistress deleted the x/withparameters branch April 2, 2024 00:56
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.

None yet

2 participants