diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-05-14 19:40:07 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-05-14 19:40:07 +0200 |
| commit | 84a5a84861c95174e6dc4b28301fc4bcb0192069 (patch) | |
| tree | 72fda86c971fec9c5e15bd02a02fa3ee49563845 | |
| parent | f6de2b1453930267015ab9323d5f83daa25667ba (diff) | |
| download | scop-master.tar.gz scop-master.tar.bz2 scop-master.zip | |
| -rw-r--r-- | 42.gif | bin | 0 -> 1014386 bytes | |||
| -rw-r--r-- | README.md | 10 | ||||
| -rw-r--r-- | shader/vertex.glsl | 3 | ||||
| -rw-r--r-- | src/main.c | 17 | ||||
| -rw-r--r-- | src/texture.c | 2 | ||||
| -rw-r--r-- | teapot.gif | bin | 0 -> 949857 bytes |
6 files changed, 14 insertions, 18 deletions
| Binary files differ @@ -1,3 +1,13 @@ # scop scop project of school 42 + + + + +# 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); } @@ -6,7 +6,7 @@ /* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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 <charles.cabergs@gmail.com> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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 Binary files differnew file mode 100644 index 0000000..f5fd327 --- /dev/null +++ b/teapot.gif |
