summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2019-09-15 14:21:43 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2019-09-15 14:21:43 +0200
commit00ff773ea10dba1fd4c1a2bb09c1ec811a798af3 (patch)
tree9c000214d6b2d2b0cc93f598341aa51c45a7d32f /res
parentb6ab2f2c62e593edb50508e0b911a01fe773122f (diff)
downloaddemoscene-eo-00ff773ea10dba1fd4c1a2bb09c1ec811a798af3.tar.gz
demoscene-eo-00ff773ea10dba1fd4c1a2bb09c1ec811a798af3.tar.bz2
demoscene-eo-00ff773ea10dba1fd4c1a2bb09c1ec811a798af3.zip
WIP: utils.c for factoring opengl tedious tasks, switch to OpenGL 3.3HEADmaster
For now, it display nothing, shaders changed without updating client code.
Diffstat (limited to 'res')
-rw-r--r--res/scene01_fs_colorfultest.glsl5
-rw-r--r--res/scene01_vs_basic.glsl12
2 files changed, 17 insertions, 0 deletions
diff --git a/res/scene01_fs_colorfultest.glsl b/res/scene01_fs_colorfultest.glsl
new file mode 100644
index 0000000..15e33a1
--- /dev/null
+++ b/res/scene01_fs_colorfultest.glsl
@@ -0,0 +1,5 @@
+#version 330 core
+out vec3 color;
+void main(){
+ color = vec3(1,0,0);
+}
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);
+}