diff options
author | Rudy Bousset <rbousset@z2r4p1.le-101.fr> | 2020-03-11 16:07:29 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r4p1.le-101.fr> | 2020-03-11 16:07:29 +0100 |
commit | 7f77c9bc922fb608f689385d642304956afe0492 (patch) | |
tree | 50ccbb70b2f39f6dbe2d8336165eea47b6b5c048 /src/ft_draw_scene.c | |
parent | qweqwe (diff) | |
download | 42-cub3d-7f77c9bc922fb608f689385d642304956afe0492.tar.gz 42-cub3d-7f77c9bc922fb608f689385d642304956afe0492.tar.bz2 42-cub3d-7f77c9bc922fb608f689385d642304956afe0492.tar.xz 42-cub3d-7f77c9bc922fb608f689385d642304956afe0492.tar.zst 42-cub3d-7f77c9bc922fb608f689385d642304956afe0492.zip |
Performance
Diffstat (limited to 'src/ft_draw_scene.c')
-rw-r--r-- | src/ft_draw_scene.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/ft_draw_scene.c b/src/ft_draw_scene.c index 9664363..39cdadc 100644 --- a/src/ft_draw_scene.c +++ b/src/ft_draw_scene.c @@ -45,22 +45,19 @@ void /* clist->wlist.x_size, clist->wlist.y_size); */ /* clist->img.ptr = mlx_get_data_addr(clist->img.img, &clist->img.bpp, */ /* &clist->img.sizeline, &clist->img.endian); */ - ft_castray(clist); + if (clist->doicast) + ft_castray(clist); + else + clist->doicast = 1; if (clist->ishud) - { ft_draw_hud(clist); - } if (clist->mlist.isskybox) ft_draw_skybox(clist); mlx_put_image_to_window(clist->wlist.wlx, clist->wlist.winptr, clist->img.img, 0, 0); if (clist->ishud && clist->mlist.isnlvl) - { if (ft_put_stage(clist) < 0) - { ft_error(FT_RET_ALLOC_ERR, FT_ERR_ALLOCATE, clist); - } - } /* mlx_destroy_image(clist->wlist.wlx, clist->img.img); */ } |