OSDN Git Service

[DRAW][OPenGL] Integrate shaders beyond GL version, excepts GL2.x.
[csp-qt/common_source_project-fm7.git] / source / src / qt / gui / gles2 / vertex_shader.glsl
1 #if __VERSION__ >= 300
2 //in mediump vec3 vertex;
3 in mediump vec3 vertex;
4 in mediump vec2 texcoord;
5 out mediump vec2 v_texcoord;
6 precision  mediump float;
7 #else
8 attribute mediump vec3 vertex;
9 attribute mediump vec2 texcoord;
10 varying mediump vec2 v_texcoord;
11 #endif
12
13 uniform mat2 rotate_mat;
14 uniform bool rotate;
15 uniform mediump mat3 v_ortho;
16 void main ()
17 {
18         vec2 xy = vertex.xy;
19         xy = rotate_mat * xy;
20         gl_Position = vec4(xy, vertex.z, 1.0);
21     v_texcoord = texcoord;
22 }
23