From 00ff773ea10dba1fd4c1a2bb09c1ec811a798af3 Mon Sep 17 00:00:00 2001 From: Ludovic Pouzenc Date: Sun, 15 Sep 2019 14:21:43 +0200 Subject: WIP: utils.c for factoring opengl tedious tasks, switch to OpenGL 3.3 For now, it display nothing, shaders changed without updating client code. --- res/scene01_vs_basic.glsl | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 res/scene01_vs_basic.glsl (limited to 'res/scene01_vs_basic.glsl') diff --git a/res/scene01_vs_basic.glsl b/res/scene01_vs_basic.glsl new file mode 100644 index 0000000..6f7c56f --- /dev/null +++ b/res/scene01_vs_basic.glsl @@ -0,0 +1,12 @@ +#version 330 core + +// Input vertex data, different for all executions of this shader. +layout(location = 0) in vec3 vertexPosition_modelspace; + +// Values that stay constant for the whole mesh. +uniform mat4 MVP; + +void main(){ + // Output position of the vertex, in clip space : MVP * position + gl_Position = MVP * vec4(vertexPosition_modelspace,1); +} -- cgit v1.2.3