Sorry You're right!
Explain better:
when I run my application, the message is printed: "no image".
Thanks


This is the code:
_________________________________________________________________________________
osg::Geode* logoGeode= new osg::Geode();
osg::ShapeDrawable* s= new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0, 0, 0), 1.0));
           logoGeode->addDrawable(s);


           osg::Texture2D* texture = new osg::Texture2D;
texture->setDataVariance(osg::Object::DYNAMIC); // protect from being optimized away as static state.
           osg::Image* img = osgDB::readImageFile("rfi.TGA");
if(img)
           {
texture->setImage(img); osg::StateSet* blendStateSet = new osg::StateSet();

                   osg::TexEnv* blendTexEnv = new osg::TexEnv;
                   blendTexEnv->setMode(osg::TexEnv::DECAL);
blendStateSet->setTextureAttributeAndModes(0,texture,osg::StateAttribute::ON);
                   blendStateSet->setTextureAttribute(0,blendTexEnv);

                   logoGeode->setStateSet(blendStateSet);
           }
           else
               std::cout<<"no image!!!!";
view->setSceneData(logoGeode);
______________________________________________________________________________________


Tomlinson, Gordon ha scritto:
Not enough information or detail in you post to allow people to really
help you

How are you applying the texture to the sphere ?

How are you setting up you texture coordinates on the sphere ?


Gordon

__________________________________________________________
Gordon Tomlinson

Product Manager 3D
Email  : gtomlinson @ overwatch.textron.com
__________________________________________________________

"Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival" - Master Tambo Tetsura

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Miriam
D'Elia
Sent: Friday, October 31, 2008 7:45 AM
To: OpenSceneGraph Users
Subject: [osg-users] problem with image

Hi to all
in my application I am applying a texture (. bmp) to a sphere, I have no
problems with the plugin, but I do not see the image.
What can I do?

Miriam
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to