forked from enlightenment/efl
elementary: fix compilation of shader with OpenGL.
SVN revision: 61765
This commit is contained in:
parent
febcbbf303
commit
618317e0c1
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue