Quote:
Another interesting thing could be OpenMP. Did you already consider using it? This would have been my first test. It offers in general a very convenient way to parallelize for-loops and could fit quite nicely to the idea of just treating the root's children (which are handled in a for-loop anyway) as parallel.
I have never worked with OpenMP so far. But replacing my thread pool with OpenMP pragmas should be straight forward.
The advantage of it would be that we don't need a thread API. But then applications that already use threads can't as easily control it like with DarkAngel's idea.
Quote:
(except when someone puts an additional group-node to the root which contains all of his scene)
The general solution is to use a list of all nodes, but that comes with a huge overhead. But with sufficiently large scenes and enough available cores that would probably be the way to go.
When the root scene node has exactly one child node, we can treat that as a special case.
Quote:
I am using a quick hack, which gives each camera a RootNode parameter. It saves all the visibility setup between rendering scenes, but it would also let you handle this case efficiently.
I really like that idea, way better than making it a special case.