Added vertex attributes.

This commit is contained in:
2014-05-07 16:42:14 -04:30
parent e5b9bd681b
commit 51183a2cf1
2 changed files with 10 additions and 10 deletions

View File

@@ -4,6 +4,13 @@ uniform mat4 u_projTrans;
// Vertex position in world coordinates.
attribute vec4 a_position;
// Vertex color.
attribute vec4 a_color;
// Vertex color to pass to the fragment shader.
varying vec4 v_color;
void main(){
v_color = a_color;
gl_Position = u_projTrans * a_position;
}