[osg-users] Building for platform without threads?

OpenSceneGraph Users osg-users at lists.openscenegraph.org
Wed Mar 25 20:18:06 PDT 2020


Hi all,

I’ve been working on an (improved) port of OSG to WebAssembly, and have a question for the experts :-) So far, my port runs well when built with threading support, but some browser implementations currently disable some of the threading support, so I need to have an alternative port which does not attempt to use threads at all.

What I’m curious about is how to configure the OpenThreads build (or whether it is advisable and/or possible to not involve OpenThreads at all) when building OSG. The WebAssembly compiler doesn’t hide the pthreads support in the headers when building single threaded, but doesn’t link against the pthreads library, so my current attempts to build single-threaded fail at link time.

I’ve looked through the OpenThreads CMakeLists, but it’s not obvious to me how to configure without any threading support at all.

Any advice?

Kind regards,
Phil


More information about the osg-users mailing list