Is your image returning a valid pointer? If not, then either the TIFF file is
corrupt, or your application cannot find the necessary plugin (osgdb_tiff.dll
or osgdb_tiffd.dll) to read the format. An easy way to test is to rewrite your
code slightly.
osg::ref_ptr<osg::Image> image = osgDB::readImageFile("porton.tif");
osg::ref_ptr<osg::Texture2D> tex;
if (image != NULL)
{
tex = new osg::Texture2D;
tex->setImage(image.get());
}
else
{
// handle error condition
}
-Brian
----- Original Message -----
From: Pedro José Muñoz Martínez
To: [email protected]
Sent: Thursday, January 03, 2008 1:37 AM
Subject: [osg-users] See images
Thanks Brian,
You were rigth. I am using a guide to introduce in OSG, and trying
osg::ref_ptr<osg::Image> image = osgDB::readImageFile("porton.tif");
osg::ref_ptr<osg::Texture2D> tex = new osg::Texture2D;
tex->setImage(image.get());
I can´t see the image. What else I need to see the image?
Thanks in advance
--
I am using the free version of SPAMfighter for private users.
It has removed 428 spam emails to date.
Paying users do not have this message in their emails.
Get the free SPAMfighter here: http://www.spamfighter.com/len
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org