Hi All; If this is much simple question please forgive me :D I am trying to create wheel body and related texture by using ShapeDrawable and can't. Do I have to use Modeling tools to create my expected looking images as you can see from attached image? Or Do I have to manipulate texture coordinate by programmatically at runtime? What should I do? I can create this wheel easly by using Blender but I want to create by coding.
ExpectedWheel part had created on DirectX by using same wheel texture.
My Code:
// Wheel
osg::ref_ptr<osg::Geode> wheelGeode = new osg::Geode();
wheelGeode->addDrawable(new osg::ShapeDrawable(new
osg::Cylinder(osg::Vec3(0.0, 0.0, 0.0), RADIUS, 0.08)));
osg::ref_ptr<osg::Texture2D> texWheel = new osg::Texture2D();
texWheel->setImage(osgDB::readImageFile("./Data/wheel.bmp"));
wheelGeode->getOrCreateStateSet()->setTextureAttributeAndModes(0,
texWheel.get(), osg::StateAttribute::ON);
Regards.
Ümit Uzun
<<attachment: Wheel.jpg>>
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

