glsl shader compilation issue at runtime
问题 I'm working on a project that uses OpenGL 4.0 shaders. I have to supply the call to glShaderSource() with an array of char arrays, which represents the source of the shader. The shader compilation is failing, with the following errors: (0) : error C0206: invalid token "<null atom>" in version line (0) : error C0000: syntax error, unexpected $end at token "<EOF>" Here's my (hello world) shader - straight from OpenGL 4.0 shading language cookbook #version 400 in vec3 VertexPosition; in vec3