A single Geometry can only have one StateSet and can't change OpenGL state
within a Geometry, so I'm not sure how you expected this to work. Other than
building a texture atlas, your best bet would be to leave them as two
separate Geometries.
   -Paul
 


> 
> Hi all,
> I am trying to merge two geometry objects that have two 
> different textures by using the merging function:
> bool Optimizer::MergeGeometryVisitor::mergeGeometry(osg::Geometry&
> lhs,osg::Geometry& rhs)
> After calling this function, one of these objects looses its 
> own texture. In fact it inherits the texture of the other 
> object. did anyone already try this function or know how to 
> merge two geometry objects correctly ?
> 
> thanks.
> 
> The following snippet code shows how I did the merging:
> osg::ref_ptr<osg::Geometry>  mergeGeoms(osg::Geometry 
> *g1,osg::Geometry *g2) {
>   osgUtil::Optimizer::MergeGeometryVisitor::mergeGeometry(*g1,*g2);
>   return g1;
> }
> 
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
> negraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to