From Jean-Sebastien Guay, Explanation:
From Jean-Sebastien Guay, Explanation:

Currently osg2cpp removes "\n" line endings to replace them with a textual equivalent ("\\n") in order for the string representing the shader to contain line endings in the string. But if the file that was read contained Windows line endings ("\r\n"), the resulting file looked really weird (the \r were left there and editors interpreted that as an additional newline). Also, I can imagine that if the shader file that was read had Mac line endings ("\r") then the output shader would all end up in one long line since there are no "\n"...

What I've done:

I've added a search and replace of "\r\n" to "\n", and then "\r" to "\n" (note that the order is important).

I've also changed the filename handling so that the output file will be put in the same directory as the input file in case it was specified with a path. Previous functionality is retained for files specified with the filename only.""


scrawl/osg,artoolkit/osg,openscenegraph/osg,jtorresfabra/osg,artoolkit/osg,openscenegraph/osg,openscenegraph/osg,tomasthoresen/osg,artoolkit/osg,jtorresfabra/osg,tomasthoresen/osg,tomasthoresen/osg,scrawl/osg,marchelbling/osg,scrawl/osg,jtorresfabra/osg,jtorresfabra/osg,artoolkit/osg,openscenegraph/osg,scrawl/osg,marchelbling/osg,tomasthoresen/osg,marchelbling/osg,marchelbling/osg