Changed appending of \n to be to the version line.

This commit is contained in:
Robert Osfield 2016-10-12 17:23:19 +01:00
parent d5d4f7239b
commit fa27a1f3ed

View File

@ -702,7 +702,7 @@ void Shader::PerContextShader::compileShader(osg::State& state)
if ((end_of_line-start_of_line)>=8 && source.compare(start_of_line, 8, "#version")==0)
{
versionLine = source.substr(start_of_line, end_of_line-start_of_line+1);
if (source[source.size()-1]!='\n') source.push_back('\n');
if (versionLine[versionLine.size()-1]!='\n') versionLine.push_back('\n');
source.insert(start_of_line, "// following version spec has been automatically reassigned to start of source list: ");