added FPS counter
This commit is contained in:
parent
e23417a33c
commit
e63eed3b92
@ -6,7 +6,7 @@
|
||||
/* By: houtworm <codam@houtworm.net> +#+ */
|
||||
/* +#+ */
|
||||
/* Created: 2023/10/26 16:54:20 by houtworm #+# #+# */
|
||||
/* Updated: 2023/10/26 16:54:33 by houtworm ######## odam.nl */
|
||||
/* Updated: 2023/10/26 20:38:07 by houtworm ######## odam.nl */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -6,11 +6,12 @@
|
||||
/* By: houtworm <codam@houtworm.net> +#+ */
|
||||
/* +#+ */
|
||||
/* Created: 2023/10/26 14:13:07 by houtworm #+# #+# */
|
||||
/* Updated: 2023/10/26 17:39:01 by houtworm ######## odam.nl */
|
||||
/* Updated: 2023/10/26 20:37:00 by houtworm ######## odam.nl */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../cub3d.h"
|
||||
#include <stdio.h>
|
||||
|
||||
void mainloop(void *param)
|
||||
{
|
||||
@ -21,9 +22,12 @@ void mainloop(void *param)
|
||||
vl->img = mlx_new_image(vl->mlx, vl->w, vl->h);
|
||||
ft_movementkeys(vl);
|
||||
ft_drawnextframe(vl);
|
||||
ft_putnbr(1 / vl->mlx->delta_time);
|
||||
ft_putendl(" FPS");
|
||||
ft_putendl(" ");
|
||||
if (!vl->img || (mlx_image_to_window(vl->mlx, vl->img, 0, 0) < 0))
|
||||
ft_errorexit("image to window failed ", "mainloop", 1);
|
||||
ft_putendl("frame");
|
||||
/*ft_putendl("frame");*/
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
|
Loading…
Reference in New Issue
Block a user