Add sprite functionality, doesn't render yet

This commit is contained in:
2016-06-07 23:54:14 +10:00
parent 864dca6f3d
commit 761609e1f9
7 changed files with 155 additions and 4 deletions
+11
View File
@@ -0,0 +1,11 @@
#version 330 core
in vec2 texCoord;
out vec4 color;
uniform sampler2D texture;
void main()
{
color = texture(texture, texCoord);
}
+10
View File
@@ -0,0 +1,10 @@
#version 330 core
layout (location = 0) in vec4 data; // (vec2)pos, (vec2)texCoord
out vec2 texCoord;
void main()
{
gl_Position = vec4(data.xy, 0.0f, 1.0f);
texCoord = data.zw;
}