Added support to osgUtil::Tesselator to insert extra vertices and other

attributes into an osg::Geometry node.  Uses the new osg::ArrayVisitor.

Converted the osg plugin Geometry support to use the new UByte4 class.
This commit is contained in:
Robert Osfield
2002-07-15 22:23:57 +00:00
parent e280b50d31
commit 8a14aa29cd
3 changed files with 193 additions and 28 deletions

View File

@@ -296,11 +296,14 @@ Array* Array_readLocalData(Input& fr)
array->reserve(capacity);
while (!fr.eof() && fr[0].getNoNestedBrackets()>entry)
{
unsigned int uint_value;
if (fr[0].getUInt(uint_value))
unsigned int r,g,b,a;
if (fr[0].getUInt(r) &&
fr[1].getUInt(g) &&
fr[2].getUInt(b) &&
fr[3].getUInt(a))
{
++fr;
array->push_back(uint_value);
array->push_back(osg::UByte4(r,g,b,a));
}
else ++fr;
}