Hi Aurelien,
I have now done a review of your enhanced RenderInfo changes and feel
they are a step in the right direction but can be improved.
As mention by Farshid the OSG can nest RenderBins and RenderStages so
a simple pointer is not sufficient. To do things correct we will nee a
push/pop pairing and use of a std::vector<> internally. I also feel
that one could just concentrate on RenderBin's in this stack, as
RenderStage is subclassed from RenderBin, if you need RenderStage you
can always use a dynamic_cast<>. I therefore would propose that we
have:
namespace osgUtil {
class RenderBin;
}
namespace osg {
class RenderInfo {
..
typedef std::vector<RenderBin*> RenderBinStack;
RenderBinStack& getRenderBinStack() { return _renderBinStack; }
void pushRenderBin(RenderBin* rb) { _renderBinStack.push_back(rb); }
void popRenderBin() { _renderBinStack.pop_back(); }
RenderBinStack _renderBinStack;
};
}
We'd also need to modify RenderBin so that it pushes/pops the
RenderBin before/after it dispatches the RenderLeaf.
I can implement this if you want.
Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org