summaryrefslogtreecommitdiff
path: root/examples/shaders/vertex-shader.glsl
blob: 2a7a4a456b7407d57fea01a0bce8b4e3cb340987 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#version 120

uniform float angle;

void main(void) {
    mat4 RotationMatrix = mat4(cos(angle), -sin(angle), 0.0, 0.0,
                               sin(angle), cos(angle),  0.0, 0.0,
                               0.0,        0.0,         1.0, 0.0,
                               0.0,        0.0,         0.0, 1.0);

    gl_Position =  gl_ModelViewProjectionMatrix * RotationMatrix * gl_Vertex;
    gl_TexCoord[0] = gl_MultiTexCoord0;
}