Skip to content

Commit

Permalink
unbind framebuffer after calling drawBuffers
Browse files Browse the repository at this point in the history
calling drawBuffers on the default framebuffer with this framebuffer's drawBuffers results in an INVALID_OPERATION
  • Loading branch information
lukaswagner committed Dec 7, 2022
1 parent 11ca50f commit 1356799
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/framebuffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,12 @@ export class Framebuffer extends AbstractObject<WebGLFramebuffer> implements Bin
this._valid = gl.isFramebuffer(this._object) && (status === gl.FRAMEBUFFER_COMPLETE);
logIf(!this._valid, LogLevel.Warning, Framebuffer.statusString(this.context, status));

gl.bindFramebuffer(gl.FRAMEBUFFER, Framebuffer.DEFAULT_FRAMEBUFFER);

if (gl2facade.drawBuffers) {
gl2facade.drawBuffers(this._drawBuffers);
}

gl.bindFramebuffer(gl.FRAMEBUFFER, Framebuffer.DEFAULT_FRAMEBUFFER);

return this._object;

}
Expand Down

0 comments on commit 1356799

Please sign in to comment.