Executing yours example I get this:
itr='D:\Visual Studio Projects\RFI\RFI\Debug'
FindFileInPath() : trying D:\Visual Studio
Projects\RFI\RFI\Debug\osgplugins-2.6
.1\osgdb_tgad.dll ...
FindFileInPath() : USING D:\Visual Studio
Projects\RFI\RFI\Debug\osgplugins-2.6.
1\osgdb_tgad.dll
Opened DynamicLibrary osgPlugins-2.6.1/osgdb_tgad.dll
FindFileInPath(rfi.TGA): returning rfi.TGA
couldn't load texture, quitting.
close(1)019DFBE8
Doing discard of deleted OpenGL objects.
decrementUsageCount()0
GraphicsContext::decrementContextIDUsageCount(0) to 0
close(0)019DFBE8
GraphicsContext::unregisterGraphicsContext 019DFBE8
CompositeViewer::~CompositeViewer()
finished CompositeViewer::~CompsiteViewer()
Destructing osgViewer::View
Destructing osg::View
Done destructing osg::View
GraphicsContext::setWindowingSystemInterface() 00000000 104F3EBC
Closing DynamicLibrary osgPlugins-2.6.1/osgdb_tgad.dll
Tomlinson, Gordon ha scritto:
2 things
1: osg::Sphere is does not have texture coords so you would not see a
texture anyway
( search the archives on Shapes and what they were designed for )
2) is rfi.TGA in your path,
turn the debug notification up see whats being said ,
place a break point in the TGA loader or step in to
readImageFile?
is you system case sensative ?
Gordon
__________________________________________________________
Gordon Tomlinson
Product Manager 3D
Email : gtomlinson @ overwatch.textron.com
__________________________________________________________
(C): (+1) 571-265-2612
(W): (+1) 703-437-7651
"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 8:19 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] problem with image
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
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org