How is string from "..." different from string from a file ?
ParticlePeter
ParticlePeter at gmx.de
Mon Dec 12 10:29:49 PST 2011
Thank you very much, you made my day, that was it :-)
Cheers, ParticlePeter !
> OpenGL probably wants a zero-terminated string. It works if you add the
> code as a literal because string literals are zero-terminated.
>
> string fragString = readText( "Shader.vert" ) ~ '\0';
>
> Alternatively, you can embed the file in you executable:
>
> immutable string fragString = import( "Shader.vert" ); // read at
> compile time
More information about the Digitalmars-d-learn
mailing list