node-sdl
node-sdl copied to clipboard
requestAnimationFrame equivalent?
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).