Details
-
Bug
-
Status: Closed
-
P3: Somewhat important
-
Resolution: Cannot Reproduce
-
5.8
-
None
-
None
Description
I am going to render a simple triangle in the scene. When using the build-in GLSL and modifing the original fixed contents to my own, the qt reports a bug as follows. I am sure that i am right because the code works before. However, after i add new texts it becomes bad.
I write the same code and using addShaderFromSourceCode, it works. So how to deal with this problem?
QOpenGLShader::compile(Vertex): 0(2) : error C0204: version directive must be first statement and may not be repeated
-
-
- Problematic Vertex shader source code ***
-
#define lowp
#define mediump
#define highp
#line 1
???#version 330 core
layout(location=0)in vec3 aPos;
......
***
add vertex shader failed! "0(2) : error C0204: version directive must be first statement and may not be repeated\n"