Hello !
I thought about multithreading irrlicht using OpenMP but the few stuff that I tried to multithread are not thread safe (OnRegisterSceneNode...)
So I was wondering if irrlicht is possible to multithread ? or was irrlicht designed for single thread and multithreading would mean to modify the whole irrlicht architecture ?
Thanks.
Multithread Irrlicht
You can probably use OpenMP on a few things like the loop that skins meshes or generating Octrees but I tried it once (For skinning a mesh) and didn't get any speed up because the amount of data is fairly small to be shared amongst threads and the thread over head pretty much killed any performance advantage.
The problem is that most "looping" operations in a scene graph are recursive and not iterative so it's hard to use OpenMP or TBB to multithread it efficiently.
The problem is that most "looping" operations in a scene graph are recursive and not iterative so it's hard to use OpenMP or TBB to multithread it efficiently.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
Well I'm sure if you ran physics and AI stuff in seperate threads you might get some performance...
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
I am already running physics on 16 threads, AI is server side, network is running on 4 threads, lag reduction on 4 threads as well, so that's already 24+1 threads but they are usually light weighted... A network thread doesn't do much but wait for a message or send a message...
What about culling algorithms ? Are they recursive ?
What about culling algorithms ? Are they recursive ?
Well. Long live CUDA! But not many processes can be completely seperated like rendering or particledrift calculations. And even those are mostlikely done by the "frame by frame" scheme (assuming that they only correlate with the old state). I.e. lagreduction based on interpolation and physical computations interfere with eachother afaik. And meanwhile the network may try to bring in the new datas. All in all i think there is a lot of communication needed.