aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
new file mode 100644
index 0000000..fc50f41
--- /dev/null
+++ b/src/main.c
@@ -0,0 +1,38 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* main.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/05/09 10:20:09 by charles #+# #+# */
+/* Updated: 2020/05/09 10:39:09 by charles ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include "libft.h"
+#include <GL/glew.h>
+#include <GLFW/glfw3.h>
+
+int main(int argc, char **argv)
+{
+ GLFWwindow* window;
+
+ if (!glfwInit())
+ return -1;
+ window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL);
+ if (!window)
+ {
+ glfwTerminate();
+ return -1;
+ }
+ glfwMakeContextCurrent(window);
+ while (!glfwWindowShouldClose(window))
+ {
+ glClear(GL_COLOR_BUFFER_BIT);
+ glfwSwapBuffers(window);
+ glfwPollEvents();
+ }
+ glfwTerminate();
+ return 0;
+}