Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Lazy rendering equivalent as RequestAnimation keeps on requesting rendering even if there is no change in frame, resulting more battery usage

  • 1 reply
  • 1 has this problem
  • 1 view
  • Last reply by saagn

more options

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 ?

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)

more options

saagn said

or what is the prefered best practice recommended?

Modified by saagn