Hi David,
I will keep playing with it to see if it is dropping the u,v coords as you
suspect. Worst case scenario I just remove the ability to apply a texture at
run-time for a mesh and make them specify it in the mesh file.
Or, just map a dummy white 1x1 texture by default, so that the obj
loader thinks there's a texture and keeps the UVs (if that's indeed the
problem).
Applying a texture at run time is not a problem, it's getting the model
loaded with the proper texture coordinates that is... After that it's
just a matter of
model->getOrCreateStateSet()->setTextureAttributeAndModes(0,
my_new_texture.get(), osg::StateAttribute::ON);
J-S
--
______________________________________________________
Jean-Sebastien Guay [email protected]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org