fixing compatibility, workign on renderer

This commit is contained in:
2022-12-18 04:04:10 +01:00
parent b275918de6
commit c907c52968
48 changed files with 6535 additions and 75 deletions

View File

@@ -6,23 +6,34 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/04 17:55:21 by maldavid #+# #+# */
/* Updated: 2022/10/05 19:25:46 by maldavid ### ########.fr */
/* Updated: 2022/12/18 03:51:19 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
#include <stdio.h>
#include "../includes/mlx.h"
int update(void *mlx)
{
static int i = 0;
puts("dude");
i++;
if (i > 1000000)
mlx_loop_end(mlx);
return (0);
}
int main(void)
{
void *win_ptr;
int x;
int y;
void *mlx_ptr;
mlx_init();
win_ptr = mlx_new_window(400, 400, "My window");
mlx_mouse_get_pos(win_ptr, &x, &y);
printf("%d, %d\n", x, y);
mlx_loop();
mlx_ptr = mlx_init();
win_ptr = mlx_new_window(mlx_ptr, 400, 400, "My window");
mlx_loop_hook(mlx_ptr, update, mlx_ptr);
mlx_loop(mlx_ptr);
mlx_destroy_window(mlx_ptr, win_ptr);
mlx_destroy_display(mlx_ptr);
return (0);
}