aboutsummaryrefslogtreecommitdiff
path: root/inc/scop.h
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-05-14 19:09:39 +0200
committerCharles <sircharlesaze@gmail.com>2020-05-14 19:09:39 +0200
commitf6de2b1453930267015ab9323d5f83daa25667ba (patch)
tree5ff586948f7ffe257f8f46919f01bd99c1ffb82a /inc/scop.h
parent23ba151d95e4284ddb2d5f1c9810741061c293fd (diff)
downloadscop-f6de2b1453930267015ab9323d5f83daa25667ba.tar.gz
scop-f6de2b1453930267015ab9323d5f83daa25667ba.tar.bz2
scop-f6de2b1453930267015ab9323d5f83daa25667ba.zip
Added ugly Cylindric UV mapping, texture/color transition
Diffstat (limited to 'inc/scop.h')
-rw-r--r--inc/scop.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/inc/scop.h b/inc/scop.h
index 50d433c..4cf7731 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/14 16:29:38 by charles ### ########.fr */
+/* Updated: 2020/05/14 19:08:24 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -59,6 +59,7 @@ typedef struct
t_ftmmat4 view;
t_ftmmat4 proj;
} transform;
+ float color_ratio;
} t_scene;
typedef struct
@@ -70,6 +71,7 @@ typedef struct
int view;
int proj;
int texture;
+ int color_ratio;
} location;
} t_shader;
@@ -84,6 +86,8 @@ typedef struct
t_shader shader;
GLenum polygon_mode;
float fov;
+ bool transition;
+ bool is_texture;
} t_state;
union u_color
@@ -131,9 +135,15 @@ int parse(char *filepath, t_model_data *object);
** error.c
*/
-# define GL_CALL(x) error_clear(); \
- x; \
- error_check(#x, __FILE__, __LINE__)
+# ifndef SCOP_RELEASE
+# define GL_CALL(x) do { \
+ error_clear(); \
+ x; \
+ error_check(#x, __FILE__, __LINE__); \
+} while (0)
+# else
+# define GL_CALL(x) x
+# endif
void error_clear(void);
void error_check(char *code, char *filename, int line_num);