aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--legacy/elementary/src/bin/test_glview.c2
-rw-r--r--legacy/elementary/src/bin/test_glview_simple.c6
2 files changed, 6 insertions, 2 deletions
diff --git a/legacy/elementary/src/bin/test_glview.c b/legacy/elementary/src/bin/test_glview.c
index 76c95ef60f..a056fd3f6e 100644
--- a/legacy/elementary/src/bin/test_glview.c
+++ b/legacy/elementary/src/bin/test_glview.c
@@ -326,7 +326,9 @@ static const char vertex_shader[] =
"}\n";
static const char fragment_shader[] =
+ "#ifdef GL_ES\n"
"precision mediump float;\n"
+ "#endif\n"
"uniform vec4 color;\n"
"uniform vec3 light;\n"
"varying vec3 rotated_normal;\n"
diff --git a/legacy/elementary/src/bin/test_glview_simple.c b/legacy/elementary/src/bin/test_glview_simple.c
index f8e5864da4..16eecadfd1 100644
--- a/legacy/elementary/src/bin/test_glview_simple.c
+++ b/legacy/elementary/src/bin/test_glview_simple.c
@@ -47,7 +47,7 @@ load_shader( GLData *gld, GLenum type, const char *shader_src )
char* info_log = malloc(sizeof(char) * info_len);
gl->glGetShaderInfoLog(shader, info_len, NULL, info_log);
- printf("Error compiling shader:\n%s\n", info_log );
+ printf("Error compiling shader:\n%s\n======\n%s\n======\n", info_log, shader_src );
free(info_log);
}
gl->glDeleteShader(shader);
@@ -70,7 +70,9 @@ init_shaders(GLData *gld)
"} \n";
GLbyte fShaderStr[] =
- "precision mediump float;\n"\
+ "#ifdef GL_ES \n"
+ "precision mediump float; \n"
+ "#endif \n"
"void main() \n"
"{ \n"
" gl_FragColor = vec4 ( 1.0, 0.0, 0.0, 1.0 );\n"