You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?:
regl.frame(() => {
if (dontDraw() === true) {
return;
}
drawVideoShader({
// shader params go here
});
});
Thank you!
The text was updated successfully, but these errors were encountered:
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.
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!
The text was updated successfully, but these errors were encountered: