From 83c78e2b5cc9b0cb737ec3785722ae280bd29b65 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 14 Feb 2020 10:43:26 +0100 Subject: Use shader from file.. --- shaders/fragment.frag | 3 ++- shaders/vertex.vert | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'shaders') diff --git a/shaders/fragment.frag b/shaders/fragment.frag index ea1ca7d..60791c2 100644 --- a/shaders/fragment.frag +++ b/shaders/fragment.frag @@ -1,8 +1,9 @@ #version 330 core -uniform vec3 triangle_color; out vec4 out_color; +uniform vec3 triangle_color; + void main() { out_color = vec4(triangle_color, 1.0); } \ No newline at end of file diff --git a/shaders/vertex.vert b/shaders/vertex.vert index d1cc433..a44217b 100644 --- a/shaders/vertex.vert +++ b/shaders/vertex.vert @@ -1,7 +1,11 @@ #version 330 core -in vec2 position; +in vec3 position; + +uniform mat4 proj; +uniform mat4 view; +uniform mat4 model; void main() { - gl_Position = vec4(position, 0.0, 1.0); + gl_Position = proj * view * model * vec4(position, 1.0); } \ No newline at end of file -- cgit v1.2.3