node-sdl icon indicating copy to clipboard operation
node-sdl copied to clipboard

requestAnimationFrame equivalent?

Open joepie91 opened this issue 7 months ago • 0 comments

In WebGL, it's typical to use requestAnimationFrame to wait for the next draw call time (synchronized with the screen refresh rate usually), so that you don't need to busy-loop and also don't need to pick a fixed FPS, but can still draw at the maximum rate that the monitor can support.

Is there some equivalent tool in either sdl or gl? All the examples I can find seem to just use timed loops at fixed rates (or a timeout of 0).

joepie91 avatar Jul 23 '24 23:07 joepie91