-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
So the gl_in_pthread.cpp never worked for me. it would always SNAP instantly to red instead of fade to red. It was only recently when I examined gl_in_proxy_pthread.cpp did I realize why. calls like this
while(emscripten_get_now() - now < 16) /no-op/;
were basically blocking the opengl updates from occuring? at least i think that's the reason. In order to fix this example for me you would only need to add the asyncify reference similar to the gl_in_proxy_pthread.cpp example... so
replace on line 55
double now = emscripten_get_now();
while(emscripten_get_now() - now < 16) /no-op/;
with this.
#if ASYNCIFY
emscripten_sleep(16);
#else
double now = emscripten_get_now();
while(emscripten_get_now() - now < 16) /no-op/;
#endif
and of course add the appropriate asyncify options to the test_browser.py .
-s ASYNCIFY -DASYNCIFY
somewhere....
This would fix the example for me and maybe help others?