I just reviewed you changes but am curious about a couple of parts to it:
const unsigned int bufSize = 261;
char path[bufSize];
if ( !dImg->getInit_from()->getValue().getPath( path, bufSize ) )
{
osg::notify( osg::WARN ) << "Unable to get path from URI." <<
std::endl;
return NULL;
}
Is there a reason for fixed size of 261?
#ifdef WIN32
std::string filename( path+1 );
#else
std::string filename( path );
#endif
Why the +1 in the case of WIN32? Is there a Win32 specific character appended on the front on the Win32 version of the COLLADA DOM?
img = osgDB::readImageFile( filename.c_str() );
Since readImageFile takes a c char* pointer perhaps we could just pass in the path rather than converting to std::string, then back to c_str() as above.
Thoughts?
Robert.
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
