[SOLVED] Camera stops updating after screenshot

I’m posting this issue and my solution in case anyone else has the same problem.
I’ve been using a version of the screenshot.js from this tutorial.
https://developer.playcanvas.com/en/tutorials/capturing-a-screenshot/
It has worked just fine in several projects but I have one project where after taking a screen shot, the scene will stop rendering. The problem seems to be gl.bindFramebuffer(gl.FRAMEBUFFER, fb); Adding a gl.deleteFramebuffer(fb); line after the frame buffer is no longer needed fixed the issue for me.

I’m not sure what is different about my current project that caused the issue or really why the issue doesn’t show up in other projects that use this but I thought I would share this solution.

@mvaligursky Without the delete framebuffer call, would there be a memory/resource leak?

sure, if additional framebuffer gets allocated, it needs to be freed.

:+1: Thanks, updated tutorial