~ubuntu-branches/ubuntu/wily/qtbase-opensource-src/wily

« back to all changes in this revision

Viewing changes to examples/opengl/cube/vshader.glsl

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2013-02-05 12:46:17 UTC
  • Revision ID: package-import@ubuntu.com-20130205124617-c8jouts182j002fx
Tags: upstream-5.0.1+dfsg
ImportĀ upstreamĀ versionĀ 5.0.1+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifdef GL_ES
 
2
// Set default precision to medium
 
3
precision mediump int;
 
4
precision mediump float;
 
5
#endif
 
6
 
 
7
uniform mat4 mvp_matrix;
 
8
 
 
9
attribute vec4 a_position;
 
10
attribute vec2 a_texcoord;
 
11
 
 
12
varying vec2 v_texcoord;
 
13
 
 
14
//! [0]
 
15
void main()
 
16
{
 
17
    // Calculate vertex position in screen space
 
18
    gl_Position = mvp_matrix * a_position;
 
19
 
 
20
    // Pass texture coordinate to fragment shader
 
21
    // Value will be automatically interpolated to fragments inside polygon faces
 
22
    v_texcoord = a_texcoord;
 
23
}
 
24
//! [0]