HI Umit, It looks to be an issue with the shadows.vert containing window line endings and osg2cpp not picking up on this. If you run a dos2unix on the shadows.vert file first and then run osg2cpp on the file it works perfectly.
Robert. On Thu, May 21, 2009 at 4:21 PM, Ümit Uzun <[email protected]> wrote: > Hi Robert; > > Yes I know we need endline sign on every line break. Actually we put endline > sign by > fout<<variableString<<"\""<<shaderSource.substr(startOfLine,endOfLine-startOfLine)<<"\\n\""<<std::endl; > So there is one "\n" sign in > shaderSource.substr(startOfLine,endOfLine-startOfLine) substring. Could you > look at the attached samples and converted type of vertex shader. Do you see > shadow_vert.cpp files distorted format? > > If I am wrong, so sorry for inconvenience. > Regards. > > 2009/5/21 Robert Osfield <[email protected]> >> >> Hi Umit, >> >> The \n is used to make sure that the warnings you get back from the >> OpenGL driver map to distrinct line numbers, without this all the >> lines would be treated as a whole program ecoded in a single line. >> >> Robert. >> >> On Thu, May 21, 2009 at 3:49 PM, Ümit Uzun <[email protected]> wrote: >> > Hi Robert; >> > >> > I have realized that when using --shader option in osg2cpp it parses >> > shader >> > file in cpp but it add unneccessary endline sign(\n) every line's end. >> > I think every shaderSource.substr(startOfLine,endOfLine-startOfLine) >> > command >> > should be >> > >> > shaderSource.substr(startOfLine,endOfLine-startOfLine-1) >> > >> > Regards. >> > >> > -- >> > Ümit Uzun >> > >> > _______________________________________________ >> > osg-users mailing list >> > [email protected] >> > >> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> > >> > >> _______________________________________________ >> osg-users mailing list >> [email protected] >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > -- > Ümit Uzun > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

