Hi,

i load a model from an obj or osg file an set a texture to the stateset. after 
starting the program the object has no texture on it, there ist only one color 
on the object (but it is the same hue like the texture) 

Is there something i have forget? I've also tried a TexGen object

Here is my code


Code:

n_plate = readNodeFile("plate.obj");
//n_plate = readNodeFile("plate.osg");
ref_ptr<Texture2D> myTex = new osg::Texture2D(readImageFile("olive.jpg"));
n_plate->getOrCreateStateSet()->                setTextureAttributeAndModes(0, 
myTex.get(), StateAttribute::ON);




Thank you!

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=45108#45108





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

Reply via email to