Open tim-steg opened 2 years ago
Yes, the above should work just fine! Come to think of it, I don't know exactly what triggers this mechanism, but since WebGL uses double-buffering, if you don't draw anything the image should stay on the screen.
Ah, maybe this is roughly what triggers it. I'd just always taken it for granted and hadn't thought about how it works: https://stackoverflow.com/questions/33327585/why-webgl-clear-draw-to-front-buffer
Anytime you do anything that effects the WebGL drawingBuffer (think "backbuffer) it gets marked to swap/copy.
Hi,
I am currently developing a video player in Regl that allows the user to zoom and pan whilst playing a live video feed. In an effort to reduce system resource consumption, I would like to make sure a frame is not drawn to the screen if nothing has changed from the last frame (which I have successfully kept track of), but is there a way to keep the old frame around and temporarily not draw anything in the
regl.frame()
loop?Would something like this work?:
Thank you!