Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Pessimistress committed Mar 17, 2024
1 parent 51a4b8a commit 18bb2c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Expand Up @@ -183,6 +183,7 @@ function _copyTextureToBuffer(device: WebGLDevice, options: CopyTextureToBufferO
);
} finally {
device.gl.bindBuffer(GL.PIXEL_PACK_BUFFER, null);
// prevHandle may be unassigned if the try block failed before binding
if (prevHandle !== undefined) {
device.gl.bindFramebuffer(GL.FRAMEBUFFER, prevHandle);
}
Expand Down
2 changes: 1 addition & 1 deletion modules/webgl/src/adapter/resources/webgl-framebuffer.ts
Expand Up @@ -40,7 +40,7 @@ export class WEBGLFramebuffer extends Framebuffer {
this.autoCreateAttachmentTextures();

/** Attach from a map of attachments */
// @ts-expect-error
// @ts-expect-error native bindFramebuffer is overridden by our state tracker
const prevHandle: WebGLFramebuffer | null = this.gl.bindFramebuffer(
GL.FRAMEBUFFER,
this.handle
Expand Down

0 comments on commit 18bb2c8

Please sign in to comment.