DrDrake / osgocean

Automatically exported from code.google.com/p/osgocean
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Line-ending ("\r\n") issues in python script #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I run the "convert_shaders.py" in MacOSX, it generates broken "*.inl" 
files.
The source shader files contain CRLF ("\r\n") line endings. This results in a 
carriage return character (0x0D) just before the \n" at the end of the line. 
For example this gives:

static const char osgOcean_downsample_frag[] =
    "#extension GL_ARB_texture_rectangle : enable
\n"

Note the orphan \n" at the new line. This doesn't compile.

Following patch in the python script fixes the problem:
Replace line
       newLine = line.replace("\n","")
with
       newLine = line.replace("\n","").replace("\r","")

Original issue reported on code.google.com by jcmon...@gmail.com on 25 Dec 2010 at 10:18

GoogleCodeExporter commented 9 years ago
Cheers, this has been changed and added to the trunk.

Kim.

Original comment by kcb...@googlemail.com on 2 Jan 2011 at 8:06

GoogleCodeExporter commented 9 years ago

Original comment by kcb...@googlemail.com on 2 Jan 2011 at 8:07

GoogleCodeExporter commented 9 years ago
Thanks

Original comment by jcmon...@gmail.com on 3 Jan 2011 at 2:51