From 84a5a84861c95174e6dc4b28301fc4bcb0192069 Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 14 May 2020 19:40:07 +0200 Subject: Added gifs --- 42.gif | Bin 0 -> 1014386 bytes README.md | 10 ++++++++++ shader/vertex.glsl | 3 ++- src/main.c | 17 +---------------- src/texture.c | 2 +- teapot.gif | Bin 0 -> 949857 bytes 6 files changed, 14 insertions(+), 18 deletions(-) create mode 100644 42.gif create mode 100644 teapot.gif diff --git a/42.gif b/42.gif new file mode 100644 index 0000000..53c73b1 Binary files /dev/null and b/42.gif differ diff --git a/README.md b/README.md index 8ec5d26..20ab958 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,13 @@ # scop scop project of school 42 + +![42](./42.gif) +![teapot](./teapot.gif) + +# Control + +- ESC : exit +- t : switch between color and texture +- mouse wheel : zoom in and out +- p : cycle through polygon modes (fill, line, point) diff --git a/shader/vertex.glsl b/shader/vertex.glsl index e61ec34..6f73689 100644 --- a/shader/vertex.glsl +++ b/shader/vertex.glsl @@ -15,5 +15,6 @@ void main() { gl_Position = u_proj * u_view * u_model * in_position; v_color = in_color; - v_texture_coord = in_texture_coord; + /* v_texture_coord = in_texture_coord; */ + v_texture_coord = vec2(in_position.y, in_position.z); } diff --git a/src/main.c b/src/main.c index 3820cd5..6f4460a 100644 --- a/src/main.c +++ b/src/main.c @@ -6,7 +6,7 @@ /* By: charles +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/05/09 10:20:09 by charles #+# #+# */ -/* Updated: 2020/05/14 16:48:35 by charles ### ########.fr */ +/* Updated: 2020/05/14 19:10:40 by charles ### ########.fr */ /* */ /* ************************************************************************** */ @@ -17,23 +17,8 @@ ** - texture ** - parse vt ** - parse coord index of f -** - transition color/texture -** - cleaner code */ -void debugmat(t_ftmmat4 *mat) -{ - for (int i = 0; i < 4; i++) - { - for (int j = 0; j < 4; j++) - { - printf("%.2f, ", mat->m[i * 4 + j]); - } - printf("\n"); - } - printf("\n"); -} - int main(int argc, char **argv) { t_state state; diff --git a/src/texture.c b/src/texture.c index 057db5f..733453d 100644 --- a/src/texture.c +++ b/src/texture.c @@ -6,7 +6,7 @@ /* By: charles +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/05/11 14:27:34 by charles #+# #+# */ -/* Updated: 2020/05/14 18:41:44 by charles ### ########.fr */ +/* Updated: 2020/05/14 19:22:20 by charles ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/teapot.gif b/teapot.gif new file mode 100644 index 0000000..f5fd327 Binary files /dev/null and b/teapot.gif differ -- cgit