Hi all,
I have a heirarchy of nodes where a leaf is a geometrical representation (opengl, so thats vertices, normals, indices…etc); each node/leaf has a container that is used for frustum culling…and that works fine. Lets call any node/leaf in this heirarchy a “spatial”. Another heirarchy is my render state heirarchy; each node in this heirarchy represents a state change and each node also contains a list of spatials that are associated with that render state.
The problem is mixing the two. I want to do frustum culling on the first heirarchy, and the ones that are culled to not appear in the second. Then, traverse the render state tree and enable state -> render spatials -> recurse for all child render states -> disable state. This may seem simple, but there are a few restrictions.
a) I cant have a boolean in spatial representing whether the spatial has been culled or not as I can insanatiate alot of small renderers everywhere and they have their own culling mechanism and those renderes are mulithreaded.
b) I can’t keep a reference to the render state that the spatial is attached to because it could be attached to multiple render states for multiple pass rnedering and for the multiple rendering mechanism.
With that in mind, anyone have any ideas on how I can communicate the results of the frustum culling with the second heirarchy ?
DP 
