On 3/8/07, Thibault Genessay <[EMAIL PROTECTED]> wrote:
Hi Licu if I am to represent the terrain > > thru normal geometry how do I encode multiple layers > > of textures (using multi-textures and multi-pass if > > necessary)? How can I use the same osg::Geometry but > > with different render states and textures? > > Just my 2 cents about multi-pass: if you need to fall back to this approach (rather than the multi-stage, which is more efficient, but sometimes does not give the result you want) I had implemented it using multiple inheritance in the graph. You can have 2 different geodes, each with its own stateset (with texturing, alpha and depth modes, etc.) as parents of the same geometry. Then you attach those geodes to the same group; the order in which you call group->addChild(geodes[pass_i]) is simply the order in which passes are drawn.
It's a bit off topic but I have a newbie question about multi-pass and multi-stage: If I understand it well, multi-pass is assigning to the same geometry two or more different statesets, and multi-stage is combining into one stateset multiple textures and assigning it to the geometry? Or have I missed something? Thanks in advance for the clarification. :) -- Serge Lages http://www.magrathea-engine.org
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
