From 3b0442df7e3270e6b191115d7316c7eb8d4e19d5 Mon Sep 17 00:00:00 2001 From: kbz_8 Date: Thu, 10 Aug 2023 08:52:46 +0200 Subject: [PATCH] Update mlx.h --- includes/mlx.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/includes/mlx.h b/includes/mlx.h index 58faa17..3494443 100644 --- a/includes/mlx.h +++ b/includes/mlx.h @@ -10,6 +10,8 @@ /* */ /* ************************************************************************** */ +// MacroLibX official repo https://github.com/420verfl0w/MacroLibX + #ifndef __MACRO_LIB_X_H__ #define __MACRO_LIB_X_H__ @@ -164,6 +166,14 @@ void* mlx_new_image(void* mlx, int width, int height); * @param y Y coordinate in the image * * @return (int) Return the pixel data + * + * /!\ If you run into glitches when writing or reading pixels from images /!\ + * You need to add IMAGES_OPTIMIZED=false to your make mlx command + * ``` + * ~ git clone https://github.com/420verfl0w/MacroLibX.git + * ~ cd MacroLibX + * ~ make IMAGES_OPTIMIZED=false + * ``` */ int mlx_get_image_pixel(void* mlx, void* img, int x, int y); @@ -177,6 +187,14 @@ int mlx_get_image_pixel(void* mlx, void* img, int x, int y); * @param color Color of the pixel to set * * @return (void) + * + * /!\ If you run into glitches when writing or reading pixels from images /!\ + * You need to add IMAGES_OPTIMIZED=false to your make mlx command + * ``` + * ~ git clone https://github.com/420verfl0w/MacroLibX.git + * ~ cd MacroLibX + * ~ make IMAGES_OPTIMIZED=false + * ``` */ void mlx_set_image_pixel(void* mlx, void* img, int x, int y, int color);