From 62374833ddf1483d18ccbc72c2e1f32a1706eab6 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 2 Jul 2013 14:17:44 +0000 Subject: [PATCH] From Laurens Voerman, "some of my ive files now generate a warning: Warning, can't assign attribute binding as no has been array assigned to set binding for. I think those are ive's with bumpmaps, but I have not checked yet. The problem is in OpenSceneGraph\src\osgPlugins\ive\Geometry.cpp where the code tries to set Normalize and Binding for a missing Array. I think that code can safely be skipped, considering the write function has a hardcoded write when the array is missing. (introduced in svn rev 13488) modified file (OpenSceneGraph\src\osgPlugins\ive\Geometry.cpp) attached in Zip" --- src/osgPlugins/ive/Geometry.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/osgPlugins/ive/Geometry.cpp b/src/osgPlugins/ive/Geometry.cpp index 69b490d2c..f1654556f 100644 --- a/src/osgPlugins/ive/Geometry.cpp +++ b/src/osgPlugins/ive/Geometry.cpp @@ -322,11 +322,11 @@ void Geometry::read(DataInputStream* in){ // Read coords if valid bool coords_valid = in->readBool(); - if(coords_valid) + if(coords_valid) { setVertexAttribArray(i, in->readArray()); - - setVertexAttribNormalize(i,normalize); - setVertexAttribBinding(i,binding); + setVertexAttribNormalize(i,normalize); + setVertexAttribBinding(i,binding); + } // Read Indices if valid bool indices_valid = in->readBool();