Added support into the .p3d format for specifying the osgDB::Options::OptionString via the <tag options="value">.
Added support into .vnc plugin for passing in the keywords "swap", "RGB", "RGBA", "BGR", "BGRA" as OptionString values to allow .p3d presentations to control whether the pixelformat should be swapped or set to a specific format.
This commit is contained in:
@@ -798,6 +798,12 @@ bool ReaderWriterP3DXML::getProperties(osgDB::XmlNode*cur, osgPresentation::Slid
|
||||
OSG_NOTIFY(_notifyLevel)<<"read effect \""<<value.effect<<"\""<<std::endl;
|
||||
}
|
||||
|
||||
if (getProperty(cur, "options", value.options))
|
||||
{
|
||||
propertiesRead = true;
|
||||
OSG_NOTIFY(_notifyLevel)<<"read options \""<<value.options<<"\""<<std::endl;
|
||||
}
|
||||
|
||||
return propertiesRead;
|
||||
}
|
||||
|
||||
@@ -813,6 +819,12 @@ bool ReaderWriterP3DXML::getProperties(osgDB::XmlNode*cur, osgPresentation::Slid
|
||||
OSG_NOTIFY(_notifyLevel)<<"read page \""<<value.page<<"\""<<std::endl;
|
||||
}
|
||||
|
||||
if (getProperty(cur, "options", value.options))
|
||||
{
|
||||
propertiesRead = true;
|
||||
OSG_NOTIFY(_notifyLevel)<<"read options \""<<value.options<<"\""<<std::endl;
|
||||
}
|
||||
|
||||
osg::Vec4 bgColour;
|
||||
if (getProperty(cur, "background", value.backgroundColor))
|
||||
{
|
||||
@@ -1018,6 +1030,8 @@ void ReaderWriterP3DXML::parseVolume(osgPresentation::SlideShowConstructor& cons
|
||||
volumeData.transferFunction = readTransferFunctionFile(transferFunctionFile, 1.0/255.0);
|
||||
}
|
||||
|
||||
if (getProperty(cur, "options", volumeData.options)) {}
|
||||
|
||||
// check for draggers required
|
||||
std::string dragger;
|
||||
if (getProperty(cur, "dragger", dragger))
|
||||
@@ -1301,7 +1315,7 @@ void ReaderWriterP3DXML::parseLayer(osgPresentation::SlideShowConstructor& const
|
||||
std::string options;
|
||||
getProperty(cur, "options", options);
|
||||
|
||||
constructor.addGraph(cur->getTrimmedContents(), options,
|
||||
constructor.addGraph(cur->getTrimmedContents(),
|
||||
positionRead ? positionData : constructor.getImagePositionData(),
|
||||
imageData);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user