Hi, I'm loading a sphere with texture that was created in Maya. In osg only a black sphere. Why?
Code for laoding texture: Code: osg::Image* image = osgDB::readImageFile( "neptune2.jpg" ); if ( image ) { osg::Texture2D* tex2d = new osg::Texture2D;//( image ); tex2d->setImage(image); tex2d->setDataVariance(osg::Object::DYNAMIC); ballNode->getOrCreateStateSet()->setTextureAttributeAndModes( 0, tex2d, osg::StateAttribute::ON); } if (!image) { std::cout << "Couldn't load texture." << std::endl; return NULL; } Thank you! Cheers, John ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31953#31953
<<attachment: 2010-09-23_020655.png>>
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org