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:
parent
5a4f962013
commit
f984f6032f
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user