Re: [osg-users] Pragmatic shader composition fails on windows

2015-03-07 Thread Sebastian Messerschmidt

Hi Robert,
Sorry for the late response, but the fix works for me.

Cheers
Sebastian

Hi Sebastian,

Thanks for the testing and fix, rather than always add in the '\n' 
I've changed the code to do a check whether the '\n' is present, if 
not add it:


   versionLine = source.substr(start_of_line, 
end_of_line-start_of_line+1);
   if (source[source.size()-1]!='\n') 
source.push_back('\n');


I've checked this into svn/trunk, also attached the file.  Could you 
try this out?


Robert.


On 4 March 2015 at 15:05, Sebastian Messerschmidt 
sebastian.messerschm...@gmx.de 
mailto:sebastian.messerschm...@gmx.de wrote:


Hi Robert,

If I put a complex version line line
#version 400 compatibility
at the beginning of my shader's source a non-valid shader code is
produced.

I've dived into the problem and found that finding the end line
terminator is non-robust in this case.
It determines the line's end with find_first_of(\n\r, ...)
This will cause the string for the version to end up having \r
as the last character, thus not a newline.

A quick fix is to add a newline (\n) to the version line, as done
in the attached submission against trunk revision.

I didn't spot this in my first tests, as I'm using some own
code/include injection adding extra newlines for the version.


Cheers
Sebastian



___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto:osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] GL error line 2255: invalid operation

2015-03-07 Thread Björn Blissing
Hi,

I haven't tried it myself, but gDebugger is available for Linux as well:
http://developer.amd.com/tools-and-sdks/archive/amd-gdebugger/

Cheers 
Björn

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=62983#62983





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] GL error line 2255: invalid operation

2015-03-07 Thread Trajce Nikolov NICK
Thanks Bjorn

Nick

On Sat, Mar 7, 2015 at 10:29 PM, Björn Blissing bjorn.bliss...@vti.se
wrote:

 Hi,

 I haven't tried it myself, but gDebugger is available for Linux as well:
 http://developer.amd.com/tools-and-sdks/archive/amd-gdebugger/

 Cheers
 Björn

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=62983#62983





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




-- 
trajce nikolov nick
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org