Thanks Glenn, fix now merged and checked into svn/trunk. I've changed the debug output to INFO as suggested. Cheers, Robert.
On Thu, Jan 6, 2011 at 2:12 PM, Glenn Waldron <[email protected]> wrote: > Robert, > Attached is a fix to State::convertVertexShaderSourceToOsgBuiltIns. The > method was incorrectly inserting new declarations before a GLSL "#version" > directive, which must always be the first line in a shader. This patch > detects the #version directive and ensures that new declarations are > inserted after it. > Attached is the modified State.cpp file. > I have also attached a sample transcript, showing the new code working > properly. I ran it against osgEarth's shaders and it works as expected. > A suggestion: convertVertexShaderSourceToOsgBuiltIns prints out messages at > the OSG_NOTICE level; I did not change that, but you might want to bump that > down to INFO. > > Glenn Waldron : Pelican Mapping : +1.703.652.4791 > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
