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 9072f9653e
commit 1cc53246e9

View File

@@ -656,7 +656,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: ");