Hi David,

Could you please apply your code to the OSG master and let me have the
changes as a PR or the whole modified file.  Copying and pasting code
is really prone to errors so I don't merge such changes as the risks
of introducing bugs is too high.

Thanks,
Robert.

On 11 January 2017 at 17:00, David Heitbrink <[email protected]> wrote:
> It looks like its the openscenegraph-3.5.5, I based it off a recent pull from:
>
> https://github.com/openscenegraph/OpenSceneGraph
>
> The modified code start at line 1228, it is here:
>
> <code>
>     if ( declPos != std::string::npos )
>     {
>         declPos = source.find(" ", declPos); // move to the first space after 
> "#version"
>         declPos = source.find_first_not_of(std::string(" "), declPos); // 
> skip all the spaces until you reach the version number
>         std::string versionNumber(source, declPos, 3);
>         int glslVersion = atoi(versionNumber.c_str());
>         OSG_INFO<<"shader version found: "<< glslVersion <<std::endl;
>         if (glslVersion >= 130) attributeQualifier = "in ";
>         // found the string, now find the next linefeed and set the insertion 
> point after it.
>         declPos = source.find( '\n', declPos );
>         declPos = declPos != std::string::npos ? declPos+1 : source.length();
>     }
>     else
>     {
>         declPos = 0;
>     }
>
>     std::string::size_type extPos = source.rfind( "#extension " );
>     if ( extPos != std::string::npos )
>     {
>         // found the string, now find the next linefeed and set the insertion 
> point after it.
>         declPos = source.find( '\n', extPos );
>         declPos = declPos != std::string::npos ? declPos+1 : source.length();
>     }
> </code>
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69959#69959
>
>
>
>
>
> _______________________________________________
> 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

Reply via email to