Added support for reading Vec3 colour arrays

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14634 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield 2014-12-23 14:20:53 +00:00
parent 5a4f962013
commit f984f6032f

View File

@ -928,7 +928,15 @@ void daeReader::resolveMeshArrays(const domP_Array& domPArray,
if (color_source)
{
// first try Vec4Array
osg::ref_ptr<osg::Array> array( createGeometryArray<osg::Vec4Array, osg::Vec4dArray, VertexIndices::COLOR>(sources[color_source], vertexIndicesIndexMap, readDoubleColors) );
// if no array matched try Vec3Array
if (!array)
{
array = createGeometryArray<osg::Vec3Array, osg::Vec3dArray, VertexIndices::COLOR>(sources[color_source], vertexIndicesIndexMap, readDoubleColors);
}
if (array.valid())
{
geometry->setColorArray(array.get());