Skip to content

Commit

Permalink
ObviousAlexC/PenPlus: Accidentally cleared the wrong buffer (#1332)
Browse files Browse the repository at this point in the history
Accidentally was clearing the draw buffer instead of the depth buffer
upon exit.
  • Loading branch information
AlexSchoolOH authored Feb 26, 2024
1 parent 0613245 commit 5a39f87
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion extensions/obviousAlexC/penPlus.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,22 @@
gl.viewport(0, 0, nativeSize[0], nativeSize[1]);
},
exit: () => {
gl.clear(gl.DEPTH_BUFFER_BIT);
inDrawRegion = false;
gl.bindFramebuffer(
gl.FRAMEBUFFER,
renderer._allSkins[renderer._penSkinId]._framebuffer.framebuffer
);
triFunctions.drawOnScreen();

//Quick clear the pen+ frame buffer
gl.bindFramebuffer(gl.FRAMEBUFFER, triFrameBuffer);
gl.clear(gl.COLOR_BUFFER_BIT);

gl.bindFramebuffer(
gl.FRAMEBUFFER,
renderer._allSkins[renderer._penSkinId]._framebuffer.framebuffer
);

gl.useProgram(penPlusShaders.pen.program);
},
};
Expand Down

0 comments on commit 5a39f87

Please sign in to comment.