docs - update gl shader docs to include gles specifics
Wiki page drawing_cube changed with summary [add precision to shader (gl_2d.c)] by jpeg
This commit is contained in:
parent
2049b94f73
commit
bb0e70b170
|
@ -226,6 +226,9 @@ pixel with this interpolated color.
|
|||
|
||||
<code c>
|
||||
GLbyte vertex_shader[] =
|
||||
"#ifdef GL_ES\n"
|
||||
"precision mediump float;\n"
|
||||
"#endif\n"
|
||||
"attribute vec4 a_position;\n"
|
||||
"attribute vec4 a_color;\n"
|
||||
"uniform mat4 u_mvp_mat;\n"
|
||||
|
@ -236,6 +239,9 @@ GLbyte vertex_shader[] =
|
|||
" v_color = a_color;\n"
|
||||
"}";
|
||||
GLbyte fragment_shader[] =
|
||||
"#ifdef GL_ES\n"
|
||||
"precision mediump float;\n"
|
||||
"#endif\n"
|
||||
"varying vec4 v_color;\n"
|
||||
"void main()\n"
|
||||
"{\n"
|
||||
|
@ -253,6 +259,9 @@ init_shaders(GLData *gld)
|
|||
Evas_GL_API *gl = gld->glapi;
|
||||
|
||||
GLbyte vertex_shader[] =
|
||||
"#ifdef GL_ES\n"
|
||||
"precision mediump float;\n"
|
||||
"#endif\n"
|
||||
"attribute vec4 a_position;\n"
|
||||
"attribute vec4 a_color;\n"
|
||||
"uniform mat4 u_mvp_mat;\n"
|
||||
|
@ -263,6 +272,9 @@ init_shaders(GLData *gld)
|
|||
" v_color = a_color;\n"
|
||||
"}";
|
||||
GLbyte fragment_shader[] =
|
||||
"#ifdef GL_ES\n"
|
||||
"precision mediump float;\n"
|
||||
"#endif\n"
|
||||
"varying vec4 v_color;\n"
|
||||
"void main()\n"
|
||||
"{\n"
|
||||
|
|
Loading…
Reference in New Issue