From cd86995d7d16c2b3c5b7fdcc19c51147709b3785 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 10 Oct 2013 20:42:24 +0000 Subject: [PATCH] From Pjotr Svetachov, "With the new osg::Geometry the binding for arrays now default to undefined. This breaks previously working code in osgAnimation::RigTransformHardware where the arrays got an undefined bounding and because of this the bone indices and weights were not loaded by the shader. Here is a little patch to fix this." --- src/osgAnimation/RigTransformHardware.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgAnimation/RigTransformHardware.cpp b/src/osgAnimation/RigTransformHardware.cpp index 57b3e4bf0..d4e64bd85 100644 --- a/src/osgAnimation/RigTransformHardware.cpp +++ b/src/osgAnimation/RigTransformHardware.cpp @@ -152,7 +152,7 @@ RigTransformHardware::BoneWeightAttribList RigTransformHardware::createVertexAtt arrayList.resize(nbArray); for (int i = 0; i < nbArray; i++) { - osg::ref_ptr array = new osg::Vec4Array; + osg::ref_ptr array = new osg::Vec4Array(osg::Array::BIND_PER_VERTEX); arrayList[i] = array; int nbVertexes = getNumVertexes(); array->resize(nbVertexes);