aboutsummaryrefslogtreecommitdiffstats
path: root/shaders
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2020-12-28 03:51:03 +0000
committerYann Herklotz <git@yannherklotz.com>2020-12-28 03:51:19 +0000
commit0d52335b21587c21774cdf2090c27aa204a7903d (patch)
tree12c4e79788cec627f92a0fdda7022a7df19076d3 /shaders
parentdf9d7726541c0e3dcb65bb0294a528fe9732d350 (diff)
downloadVivant-0d52335b21587c21774cdf2090c27aa204a7903d.tar.gz
Vivant-0d52335b21587c21774cdf2090c27aa204a7903d.zip
Add proper VAO and VBO
Diffstat (limited to 'shaders')
-rw-r--r--shaders/triangle.frag6
-rw-r--r--shaders/triangle.vert6
2 files changed, 8 insertions, 4 deletions
diff --git a/shaders/triangle.frag b/shaders/triangle.frag
index 244d850..2d290fd 100644
--- a/shaders/triangle.frag
+++ b/shaders/triangle.frag
@@ -1,7 +1,9 @@
-#version 120
+#version 150
uniform vec4 ourColour;
+out vec4 fragColor;
+
void main() {
- gl_FragColor = ourColour.yyzw;
+ fragColor = ourColour;
}
diff --git a/shaders/triangle.vert b/shaders/triangle.vert
index 45f6c13..cc5441d 100644
--- a/shaders/triangle.vert
+++ b/shaders/triangle.vert
@@ -1,5 +1,7 @@
-attribute vec2 coord2d;
+#version 150
+
+in vec2 position;
void main(void) {
- gl_Position = vec4(coord2d, 0.0, 1.0);
+ gl_Position = vec4(position, 0.0, 1.0);
}