From 3fa1f2ed5abddb6383d556c8fa68fe0453d52bd9 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 26 May 2011 16:34:33 +0000 Subject: [PATCH] From Dietmar Funck, "I've noticed an issue when writing arrays of type Vec2D and Vec3D to a .osgb file. A number is written to the output stream to identify the array type. In case of Vec2D and Vec3D arrays Vec4D is written as array type - I guess this is a copy and paste mistake. Writing the correct array types fixes the issue - in my case it fixes writing and afterwards reading geometry instances." --- src/osgDB/OutputStream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osgDB/OutputStream.cpp b/src/osgDB/OutputStream.cpp index 539f46749..1d4eeabbb 100644 --- a/src/osgDB/OutputStream.cpp +++ b/src/osgDB/OutputStream.cpp @@ -232,11 +232,11 @@ void OutputStream::writeArray( const osg::Array* a ) writeArrayImplementation( static_cast(a), a->getNumElements() ); break; case osg::Array::Vec2dArrayType: - *this << MAPPEE(ArrayType, ID_VEC4D_ARRAY); + *this << MAPPEE(ArrayType, ID_VEC2D_ARRAY); writeArrayImplementation( static_cast(a), a->getNumElements() ); break; case osg::Array::Vec3dArrayType: - *this << MAPPEE(ArrayType, ID_VEC4D_ARRAY); + *this << MAPPEE(ArrayType, ID_VEC3D_ARRAY); writeArrayImplementation( static_cast(a), a->getNumElements() ); break; case osg::Array::Vec4dArrayType: