Re: [osg-users] Pragmatic shader composition - bug

2016-10-13 Thread Glenn Waldron
Success, it works (tested on the 3.4 branch). Cheers. Glenn Waldron On Wed, Oct 12, 2016 at 12:26 PM, Robert Osfield wrote: > Hi Glenn, > > >> Is actually wrong and should be: > >> > >> if (versionLine[versionLine.versionLine.size()-1]!='\n') > >> versionLine.push_back('\n'); > >> > > I have ch

Re: [osg-users] Pragmatic shader composition - bug

2016-10-12 Thread Robert Osfield
Hi Glenn, >> Is actually wrong and should be: >> >> if (versionLine[versionLine.versionLine.size()-1]!='\n') >> versionLine.push_back('\n'); >> I have checked this change into OSG master and OpenSceneGraph-3.4 branch. Could you let me know if that works fine. Cheers, Robert

Re: [osg-users] Pragmatic shader composition - bug

2016-10-12 Thread Glenn Waldron
Robert, Yes, I think you are correct. Glenn Waldron On Wed, Oct 12, 2016 at 10:46 AM, Robert Osfield wrote: > HI Glen, > > Could it be the line: > > if (source[source.size()-1]!='\n') source.push_back('\n'); > > Is actually wrong and should be: > > if (versionLine[versionLine.versionLine.size()

Re: [osg-users] Pragmatic shader composition - bug

2016-10-12 Thread Robert Osfield
HI Glen, Could it be the line: if (source[source.size()-1]!='\n') source.push_back('\n'); Is actually wrong and should be: if (versionLine[versionLine.versionLine.size()-1]!='\n') versionLine.push_back('\n'); So rather than adding this, it should replace the original line appending the \n to t

[osg-users] Pragmatic shader composition - bug

2016-10-12 Thread Glenn Waldron
Robert, I was trying to use the pragmatic shader comp in OSG 3.4 and ran into the following bug. osg::Shader attempts to extract the "#version" string and insert the new #define statements between the #version line and the rest of the source. However, if the #version line ends in a CRLF combinatio