commit c666a97ee9a1201d40402c4f29e1fa8b8dc41e9e
parent a97b0184b512ffe781d8573aeffa8577789d81bf
Author: David DiPaola <DavidDiPaola@users.noreply.github.com>
Date: Tue, 22 May 2018 07:53:27 -0400
00-triangle: small style fix
doc: added license to source code
Diffstat:
8 files changed, 43 insertions(+), 4 deletions(-)
diff --git a/00-triangle.c b/00-triangle.c
@@ -1,3 +1,10 @@
+/*
+2018 David DiPaola
+licensed under CC0 (public domain, see https://creativecommons.org/publicdomain/zero/1.0/)
+*/
+
+/* followed this tutorial: http://www.opengl-tutorial.org/beginners-tutorials/tutorial-2-the-first-triangle/ */
+
#include <stdio.h>
#include <stdlib.h>
@@ -31,10 +38,7 @@ main() {
"}" "\n"
;
GLuint program_ID = 0;
- status = ogl_program_build(
- vertexshader, fragmentshader,
- &program_ID
- );
+ status = ogl_program_build(vertexshader, fragmentshader, &program_ID);
if (status < 0) {
fprintf(stderr, "\t" "at %s : %d" "\n", __FILE__, __LINE__);
return status;
diff --git a/ogl/_ogl.c b/ogl/_ogl.c
@@ -1,3 +1,8 @@
+/*
+2018 David DiPaola
+licensed under CC0 (public domain, see https://creativecommons.org/publicdomain/zero/1.0/)
+*/
+
#include <stdio.h>
int _ogl_window_width = 0;
diff --git a/ogl/_ogl.h b/ogl/_ogl.h
@@ -1,3 +1,8 @@
+/*
+2018 David DiPaola
+licensed under CC0 (public domain, see https://creativecommons.org/publicdomain/zero/1.0/)
+*/
+
extern int _ogl_window_width;
extern int _ogl_window_height;
diff --git a/ogl/ogl.h b/ogl/ogl.h
@@ -1,3 +1,8 @@
+/*
+2018 David DiPaola
+licensed under CC0 (public domain, see https://creativecommons.org/publicdomain/zero/1.0/)
+*/
+
int
ogl_init(
int window_width, int window_height, const char * window_title,
diff --git a/ogl/ogl_init.c b/ogl/ogl_init.c
@@ -1,3 +1,8 @@
+/*
+2018 David DiPaola
+licensed under CC0 (public domain, see https://creativecommons.org/publicdomain/zero/1.0/)
+*/
+
#include <stdio.h>
#include <GL/glew.h>
diff --git a/ogl/ogl_program_attribute_get_ID.c b/ogl/ogl_program_attribute_get_ID.c
@@ -1,3 +1,8 @@
+/*
+2018 David DiPaola
+licensed under CC0 (public domain, see https://creativecommons.org/publicdomain/zero/1.0/)
+*/
+
#include <stdio.h>
#include <GL/glew.h>
diff --git a/ogl/ogl_program_build.c b/ogl/ogl_program_build.c
@@ -1,3 +1,8 @@
+/*
+2018 David DiPaola
+licensed under CC0 (public domain, see https://creativecommons.org/publicdomain/zero/1.0/)
+*/
+
#include <stdio.h>
#include <stdlib.h>
diff --git a/ogl/ogl_vertex_buffer_load.c b/ogl/ogl_vertex_buffer_load.c
@@ -1,3 +1,8 @@
+/*
+2018 David DiPaola
+licensed under CC0 (public domain, see https://creativecommons.org/publicdomain/zero/1.0/)
+*/
+
#include <GL/glew.h>
int