Skip to content

Commit

Permalink
Merge pull request #286 from lukaswagner/master
Browse files Browse the repository at this point in the history
unbind framebuffer after calling drawBuffers
  • Loading branch information
cgcostume committed Dec 12, 2022
2 parents 11ca50f + 1356799 commit 356101a
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 356101a

Please sign in to comment.