From b699c8e9abb7a892465e8f05422b4d4cfa5d2f3e Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 18 Apr 2005 13:36:10 +0000 Subject: [PATCH] Further work on uniforms support in .osg --- src/osgPlugins/osg/Uniform.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/osgPlugins/osg/Uniform.cpp b/src/osgPlugins/osg/Uniform.cpp index 132f965c5..979dcc47b 100644 --- a/src/osgPlugins/osg/Uniform.cpp +++ b/src/osgPlugins/osg/Uniform.cpp @@ -41,10 +41,10 @@ bool Uniform_readLocalData(Object& obj, Input& fr) // TODO read uniform value based on type - if (fr.matchSequence("type %w")) + if (fr[0].isWord()) { - uniform.setType( Uniform::getTypeId(fr[1].getStr()) ); - fr+=2; + uniform.setType( Uniform::getTypeId(fr[0].getStr()) ); + fr+=1; iteratorAdvanced = true; } @@ -227,6 +227,10 @@ bool Uniform_readLocalData(Object& obj, Input& fr) osg::notify(osg::WARN)<<"Warning : type not supported for reading."<