GLSL Version changed

- Shaders specify version 140 (opengl 3.1) instead of 330. This should fix the "GLSL 3.30 is not supported" error.
This commit is contained in:
Maxime Gimeno 2015-08-06 15:19:36 +02:00
parent 970e767bbf
commit e413b0c45a
1 changed files with 4 additions and 4 deletions

View File

@ -232,7 +232,7 @@ void Viewer::compile_shaders()
//Vertex source code //Vertex source code
const char vertex_source[] = const char vertex_source[] =
{ {
"#version 330 \n" "#version 140 \n"
"in highp vec4 vertex;\n" "in highp vec4 vertex;\n"
"in highp vec3 normal;\n" "in highp vec3 normal;\n"
"in highp vec4 color;\n" "in highp vec4 color;\n"
@ -254,7 +254,7 @@ void Viewer::compile_shaders()
//Vertex source code //Vertex source code
const char fragment_source[] = const char fragment_source[] =
{ {
"#version 330 \n" "#version 140 \n"
"in highp vec4 fP; \n" "in highp vec4 fP; \n"
"in highp vec3 fN; \n" "in highp vec3 fN; \n"
"in highp vec4 fColor; \n" "in highp vec4 fColor; \n"
@ -310,7 +310,7 @@ void Viewer::compile_shaders()
//Vertex source code //Vertex source code
const char vertex_source_p_l[] = const char vertex_source_p_l[] =
{ {
"#version 330 \n" "#version 140 \n"
"in highp vec4 vertex;\n" "in highp vec4 vertex;\n"
"uniform highp mat4 mvp_matrix;\n" "uniform highp mat4 mvp_matrix;\n"
"void main(void)\n" "void main(void)\n"
@ -321,7 +321,7 @@ void Viewer::compile_shaders()
//Vertex source code //Vertex source code
const char fragment_source_p_l[] = const char fragment_source_p_l[] =
{ {
"#version 330 \n" "#version 140 \n"
"uniform highp vec4 color; \n" "uniform highp vec4 color; \n"
"void main(void) { \n" "void main(void) { \n"
"gl_FragColor = color; \n" "gl_FragColor = color; \n"