Lazy rendering equivalent as RequestAnimation keeps on requesting rendering even if there is no change in frame, resulting more battery usage
I am working on a rendering SDK API that is compiling existing code to webgl using emscripten. In the desktop version we had a lazy rendering mechanism that only renders when required which is basically just saying invalidate rectangle and setting render flag but due to lack of threads that functionality is broken so i was looking on making an equivalent.
I thought i can do that by setting timeout timers and resetting it on userinput and all but everywhere i read i saw that RequestAnimation frame shall be used. Is there any equivalent to lazy rendering ?
All Replies (1)
saagn said
or what is the prefered best practice recommended?
Modified