aboutsummaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-05-11 02:19:18 +0200
committerCharles <sircharlesaze@gmail.com>2020-05-11 02:19:18 +0200
commit6623e7fbdb4307536d3f5920c267c74f8bc6a989 (patch)
treeaa90789d7e5195e747997b507d09066c3758d777 /inc
parentd153f42e732ffe1c4cac1c13207fa0ce1781b193 (diff)
downloadscop-6623e7fbdb4307536d3f5920c267c74f8bc6a989.tar.gz
scop-6623e7fbdb4307536d3f5920c267c74f8bc6a989.tar.bz2
scop-6623e7fbdb4307536d3f5920c267c74f8bc6a989.zip
Generating triangles for polygon face in .obj file, opengl error/initialisation
Diffstat (limited to 'inc')
-rw-r--r--inc/scop.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/inc/scop.h b/inc/scop.h
index d6cf415..3d5c966 100644
--- a/inc/scop.h
+++ b/inc/scop.h
@@ -6,7 +6,7 @@
/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/05/09 10:41:44 by charles #+# #+# */
-/* Updated: 2020/05/10 21:18:15 by charles ### ########.fr */
+/* Updated: 2020/05/11 02:10:09 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -15,6 +15,8 @@
# include <unistd.h>
# include <fcntl.h>
+# include <stdbool.h>
+# include <stdlib.h>
# include <GL/glew.h>
# include <GLFW/glfw3.h>
# include "libft.h"
@@ -28,10 +30,39 @@ typedef struct
size_t indices_len;
} t_object;
+typedef struct
+{
+ unsigned int vertex_buf;
+ unsigned int index_buf;
+} t_gl_state;
+
/*
** parse.c
*/
int parse(char *filepath, t_object *object);
+/*
+** gl.c
+*/
+
+int gl_state_init(t_gl_state *state, t_object *object);
+
+/*
+** error.c
+*/
+
+# define GL_CALL(x) error_clear(); \
+ x; \
+ error_check(#x, __FILE__, __LINE__)
+
+void error_clear(void);
+void error_check(char *code, char *filename, int line_num);
+
+/*
+** glfw.c
+*/
+
+GLFWwindow *glfw_init(int width, int height);
+
#endif