From 55ae5b1c5f70100337ca2674c1e34b1c17d24127 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 18 Jun 2013 15:03:26 +0000 Subject: [PATCH] Moved the set binding and normalize for VertexAttrib to after the VertexAttrib array assignment --- src/osgWrappers/deprecated-dotosg/osg/Geometry.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/osgWrappers/deprecated-dotosg/osg/Geometry.cpp b/src/osgWrappers/deprecated-dotosg/osg/Geometry.cpp index d7d24f219..fccd6e775 100644 --- a/src/osgWrappers/deprecated-dotosg/osg/Geometry.cpp +++ b/src/osgWrappers/deprecated-dotosg/osg/Geometry.cpp @@ -1,3 +1,5 @@ +#define OSG_USE_DEPRECATED_GEOMETRY_METHODS 1 + #include #include #include @@ -322,25 +324,23 @@ bool Geometry_readLocalData(Object& obj, Input& fr) { int unit=0; fr[1].getInt(unit); - geom.setVertexAttribBinding(unit,vertexAttribBinding); fr+=3; iteratorAdvanced = true; } + bool vertexAttribNormalize = false; if (fr.matchSequence("VertexAttribNormalize %i %w")) { int unit=0; fr[1].getInt(unit); - if (fr[2].matchString("TRUE")) - geom.setVertexAttribNormalize(unit,GL_TRUE); - else - geom.setVertexAttribNormalize(unit,GL_FALSE); + vertexAttribNormalize = fr[2].matchString("TRUE"); fr+=3; iteratorAdvanced = true; } + if (fr.matchSequence("VertexAttribArray %i")) { int unit=0; @@ -351,6 +351,8 @@ bool Geometry_readLocalData(Object& obj, Input& fr) if (vertexattrib) { geom.setVertexAttribArray(unit,vertexattrib); + geom.setVertexAttribBinding(unit,vertexAttribBinding); + geom.setVertexAttribNormalize(unit,vertexAttribNormalize); } iteratorAdvanced = true;