Multiple scenes



I’m trying to evaluate whether I could use bsf for a tool I’m making. One thing I need to be able to do is render different scenes to different viewports. It looks like I could render to multiple viewports easily enough using RenderTarget/RenderWindow. It’s not clear to me though if there’s a mechanism for rendering different scenes to those viewports. I need one ‘main’ scene and then some smaller trivial scenes for things like rendering asset preview tiles. Would this sort of thing be possible without extensive modifications?



You can use the concept of layers to filter rendering of an object to a particular camera. See CRenderable::setLayer and CCamera::setLayers. If your separate scenes also need to use physics you can similarly set layers on physical objects as well.

I believe that should be enough for your use case although I do like the idea of being able to have completely different scene object hierarchies, it would certainly be more intuitive than setting layers, and shouldn’t be too hard to implement, so perhaps expect that in the future as well.