Closed j-o closed 9 years ago
Why is reading binary shader files on windows annoying? Is one line ending count twice? Is the default type for open files always text?
Yes, the extra \r
s appear in strings then and must be taken into account. The convention for C++ is to work with pure \n
s internally on all platforms and let iostreams in text mode deal with platforms specific stuff.
Do you mean default in globjects (no) or the std library (yes)?
I meant in the STL, thanks for the clarification.
... because processing shaders read in binary mode on Windows is rather annoying, as they contain
\r\n
line endings (possibly mixed with pure\n
).