1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0032723: Draw Harness, ViewerTest - sloppy animation in WebGL

Fixed emscripten_async_call() calls to use requestAnimationFrame() instead of setTimeout().
ViewerTest_EventManager::handleViewRedraw() - fixed queuing new onWasmRedrawView()
before previous one has been processed (leading to multiplying of pending redraws executed at the same time).
RWGltf_TriangulationReader::readDracoBuffer - suppressed CLang compilation warnings.
This commit is contained in:
kgv
2021-12-07 20:07:04 +03:00
committed by smoskvin
parent f4f9ce4b77
commit e3dae4a9f3
6 changed files with 44 additions and 23 deletions

View File

@@ -138,6 +138,13 @@ protected:
unsigned int theModifNew,
double theTimeStamp);
private:
#if defined(__EMSCRIPTEN__)
//! Callback flushing events and redrawing the WebGL canvas.
static void onWasmRedrawView (void* );
#endif
private:
Handle(AIS_InteractiveContext) myCtx;
@@ -148,7 +155,7 @@ private:
Standard_Boolean myToPickPnt;
Standard_Boolean myIsTmpContRedraw;
unsigned int myUpdateRequests; //!< counter for unhandled update requests
unsigned int myNbUpdateRequests; //!< counter for unhandled update requests
};