OpenGL Shader Compilation Issue — Unexpected EOF

前端 未结 3 1673
误落风尘
误落风尘 2021-02-08 20:00

So I decided to try writing a simple OpenGL app using Java, just to see how it compared to my other efforts, and I\'m running into an issue where my shaders refuse to compile. T

3条回答
  •  借酒劲吻你
    2021-02-08 20:16

    Try moving the comment to after the #version declaration. It shouldn't matter, but there can be driver bugs.

    Also, try putting an extra empty line at the end of the file. Again, just to be sure.

    Lastly, make sure that you are in fact loading the string properly. Check it in the debugger. And make sure you're passing the string to OpenGL correctly. What does that code look like?

提交回复
热议问题