draw spinning quad with a texture instead of smoothed colors

This commit is contained in:
josh committed 2012-11-19 22:15:09 -05:00
1 parent d34c51acf9
commit 758435fd63
6 files changed
+47 -20

No files matched your search

+3 -2
View File
@@ -1,7 +1,8 @@
varying vec3 color_i;
varying vec2 tex_coord_i;
uniform sampler2D tex;
void main()
{
gl_FragColor = vec4(color_i, 1);
gl_FragColor = texture2D(tex, tex_coord_i);
}
+3 -3
View File
@@ -2,11 +2,11 @@
uniform mat4 projection;
uniform mat4 modelview;
attribute vec3 pos;
attribute vec3 color;
varying vec3 color_i;
attribute vec2 tex_coord;
varying vec2 tex_coord_i;
void main()
{
gl_Position = projection * modelview * vec4(pos, 1);
color_i = color;
tex_coord_i = tex_coord;
}