Hello, does anyone know of a way to render new frames in WebGL without updating the HTML canvas? I need to push frames for the scene to look right, but I don’t want to show the user until it’s ready. It’s only for a brief period of time, so I’d rather not flash an HTML element above the canvas. I can’t just tell WebGL to stop pushing new frames all together because I still need the new frames be rendered behind the scenes. Any ideas?
Have you considered to render into a render target?
Thanks @Mugen87, that definitely seems like a foolproof way to do it. I have limited experience with render targets, so I guess I was trying to see if there was an easier way to freeze the canvas before considering render targets.
Not that I am aware of. The renderer’s canvas shows the data rendered to the default framebuffer. As soon as you render into it, the data will be visible on screen. The only way to prevent this is to render into a different framebuffer (which is nothing else than render target).