This code looks interesting: (cc'ing here for those watching in).
I will try something like this out tomorrow.
-Allen
virtual bool doRead(std::istream & is, const path & path)
{
std::string ext = fs::extension(path);
if (ext == ".osb") {
osg::FieldContainerPtr fc = osg::NFIOBase::readFC(is, "");
if (!fc) {
s_log.err("OpenSG failed to read '%s'", path.string().c_str());
return false;
}
m_image = osg::ImagePtr::dcast(fc);
if (!m_image) {
s_log.err("'%s' doesn't hold a Image, but a '%'.",
path.string().c_str(), fc->getClassType().getCName());
}
return bool(m_image);
}
virtual bool doWrite(std::ostream & os, const path & path)
{
if (fs::extension(path) == ".osb") {
return osg::NFIOBase::writeFC(m_image, os, "");
} else {
return osg::ImageFileHandler::the().write(m_image, os,
fs::extension(path).substr(1));
}
}
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users