diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..e82f86c --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,75 @@ +name: Windows (xmake) + +on: + pull_request: + push: + paths-ignore: + - '.gitignore' + - 'LICENSE' + - 'README.md' + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [windows-latest] + arch: [x64] + mode: [release] + + runs-on: ${{ matrix.os }} + if: "!contains(github.event.head_commit.message, 'ci skip')" + + steps: + - name: Get current date as package key + id: cache_key + run: echo "key=$(date +'%W')" >> $GITHUB_OUTPUT + + - name: Checkout repository + uses: actions/checkout@v4 + + # Install system dependencies + - name: Install Vulkan SDK + uses: humbletim/install-vulkan-sdk@v1.1.1 + with: + version: 1.3.204.1 + cache: true + + # Force xmake to a specific folder (for cache) + - name: Set xmake env + run: echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/xmake-global" >> $GITHUB_ENV + + # Install xmake + - name: Setup xmake + uses: xmake-io/github-action-setup-xmake@v1 + with: + xmake-version: branch@master + actions-cache-folder: .xmake-cache-W${{ steps.cache_key.outputs.key }} + + # Update xmake repository (in order to have the file that will be cached) + - name: Update xmake repository + run: xmake repo --update + + # Fetch xmake dephash + - name: Retrieve dependencies hash + id: dep_hash + run: echo "hash=$(xmake l utils.ci.packageskey)" >> $GITHUB_OUTPUT + + # Cache xmake dependencies + - name: Retrieve cached xmake dependencies + uses: actions/cache@v3 + with: + path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages + key: Windows-${{ matrix.arch }}-${{ matrix.mode }}-${{ steps.dep_hash.outputs.hash }}-W${{ steps.cache_key.outputs.key }} + + # Setup compilation mode and install project dependencies + - name: Configure xmake and install dependencies + run: xmake config --arch=${{ matrix.arch }} --mode=${{ matrix.mode }} --yes + + # Build the mlx + - name: Build MacroLibX + run: xmake --yes + + # Build the test + - name: Build Test + run: xmake build --yes Test diff --git a/.gitignore b/.gitignore index 50cb388..2911f85 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,18 @@ *.a *.so *.out +*.dll +*.lib +*.exp +*.json +*.tmp +*.ilk +*.pdb +*.exe +.vs/ +.xmake/ .cache/ +objs/ +build/ test/.gdb_history +test/Test diff --git a/Makefile b/Makefile index f5c7986..a6d8efe 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ NAME = libmlx.so SRCS = $(wildcard $(addsuffix /*.cpp, ./src/core)) +SRCS += $(wildcard $(addsuffix /*.cpp, ./src/core/**)) SRCS += $(wildcard $(addsuffix /*.cpp, ./src/platform)) SRCS += $(wildcard $(addsuffix /*.cpp, ./src/renderer)) SRCS += $(wildcard $(addsuffix /*.cpp, ./src/renderer/**)) diff --git a/README.md b/README.md index a7fae86..cfdd314 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,9 @@ +
+ +
###### MacroLibX, a rewrite of 42 School's MiniLibX using SDL2 and Vulkan. @@ -45,6 +48,10 @@ brew install molten-vk brew install SDL2 ``` +### đŸĒŸ Windows + +To build on Windows you may need to use the [xmake](https://xmake.io) build. [Here's](./XMAKE_BUILD.md) how you can use it. + ### Clone and Build Finally, you can clone the Git repository. When inside it, run the GNU `make` command to compile MacroLibX. diff --git a/XMAKE_BUILD.md b/XMAKE_BUILD.md new file mode 100644 index 0000000..b0e5218 --- /dev/null +++ b/XMAKE_BUILD.md @@ -0,0 +1,47 @@ +# đŸ—ī¸ xmake build +To build on Windows (if you don't use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install)) or on other OS, the MacroLibX uses [xmake](https://xmake.io), a build system which will download and compile all dependencies it won't find on your computer. + +## 💾 Install xmake +You can find how to install it on your system [here](https://xmake.io/#/guide/installation). Note that you can also download a [portable version](https://github.com/xmake-io/xmake/releases) of xmake if you wish not to install it. + +## âš™ī¸ Configure the MacroLibX build +Just as the Makfile build system, you can configure how xmake should build the MacroLibX. The base command to configure it is `xmake config [opts...]` or `xmake f [opts...]`. + +### đŸ“Ļ Compile mode +You can configure xmake to build the mlx in debug mode or in release mode (release mode is enabled by default). To do so you can use `xmake config --mode=debug` or `xmake config --mode=release`. + +### đŸ› ī¸ Set the toolchain +To change the compilation toolchain using `xmake config --toolchain=[gcc|clang|...]` + +### đŸ–ŧī¸ Image optimisations +If you run into glitches when writing or reading pixels from images you can turn off image optimisations using `xmake config --images_optimized=n`. + +### đŸ–Ĩī¸ Force the use of the integrated GPU (not recommended) +You can force the mlx to use your integrated GPU using `xmake config --force_integrated_gpu=y`. Note that there are a lot of chances that your application crashes using that. + +### đŸ’Ŋ Dump the graphics memory +The mlx can dump it's graphics memory use to json files every two seconds by enabling this option `xmake config --graphics_memory_dump=y`. + +### đŸĒ› A possible build configuration +As a configuration example here's how the command can look like `xmake config --mode=debug --toolchain=clang --graphics_memory_dump=y --images_optimized=n` + +## 🚧 Build the lib + +### Compile using command-line (first method) +Once you're ready to compile the lib, run `xmake` (or `xmake -jX` if you wish not to use all your computer threads, with X being the number of threads you wish to use) and watch as the lib compiles. + +### Generate a project (second method) +xmake can also generate a project file for another tool: +* Visual Studio : `xmake project -k vs` +* CMakeLists.txt (which you can open in CLion and more) : `xmake project -k cmake` +* Makefile : `xmake project -k make` +* Ninja : `xmake project -k ninja` +* XCode : `xmake project -k xcode` + +You should now be able to open the project file with the tool of your choice. + +## 😋 Enjoy +Enjoy you project built with the mlx +

+ drawing +

\ No newline at end of file diff --git a/includes/mlx.h b/includes/mlx.h index 7c10776..57dc761 100644 --- a/includes/mlx.h +++ b/includes/mlx.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 16:56:35 by maldavid #+# #+# */ -/* Updated: 2023/12/08 12:14:31 by kbz_8 ### ########.fr */ +/* Updated: 2023/12/08 18:07:40 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,6 +15,20 @@ #ifndef __MACRO_LIB_X_H__ #define __MACRO_LIB_X_H__ +#if defined(_WIN32) || defined(_WIN64) + #define MLX_EXPORT __declspec(dllexport) + #define MLX_IMPORT __declspec(dllimport) +#else + #define MLX_EXPORT + #define MLX_IMPORT +#endif + +#ifdef MLX_BUILD + #define MLX_API MLX_EXPORT +#else + #define MLX_API MLX_IMPORT +#endif + #ifdef __cplusplus extern "C" { #endif @@ -34,7 +48,7 @@ typedef enum * * @return (void*) An opaque pointer to the internal MLX application or NULL (0x0) in case of error */ -void* mlx_init(); +MLX_API void* mlx_init(); /** * @brief Creates a new window @@ -46,7 +60,7 @@ void* mlx_init(); * * @return (void*) An opaque pointer to the internal MLX window or NULL (0x0) in case of error */ -void* mlx_new_window(void* mlx, int w, int h, const char* title); +MLX_API void* mlx_new_window(void* mlx, int w, int h, const char* title); /** * @brief Gives a function to be executed at each loop turn @@ -58,7 +72,7 @@ void* mlx_new_window(void* mlx, int w, int h, const char* title); * @return (int) Always return 0, made this to copy the behaviour of the original MLX */ -int mlx_loop_hook(void* mlx, int (*f)(), void* param); +MLX_API int mlx_loop_hook(void* mlx, int (*f)(void*), void* param); /** * @brief Starts the internal main loop @@ -67,7 +81,7 @@ int mlx_loop_hook(void* mlx, int (*f)(), void* param); * * @return (int) Always return 0, made this to copy the behaviour of the original MLX */ -int mlx_loop(void* mlx); +MLX_API int mlx_loop(void* mlx); /** * @brief Ends the internal main loop @@ -76,21 +90,21 @@ int mlx_loop(void* mlx); * * @return (int) Always return 0, made this to copy the behaviour of the original MLX */ -int mlx_loop_end(void* mlx); +MLX_API int mlx_loop_end(void* mlx); /** * @brief Shows mouse cursor * * @return (int) Always return 0, made this to copy the behaviour of the original MLX */ -int mlx_mouse_show(); +MLX_API int mlx_mouse_show(); /** * @brief Hides mouse cursor * * @return (int) Always return 0, made this to copy the behaviour of the original MLX */ -int mlx_mouse_hide(); +MLX_API int mlx_mouse_hide(); /** * @brief Moves cursor to givent position @@ -102,7 +116,7 @@ int mlx_mouse_hide(); * * @return (int) Always return 0, made this to copy the behaviour of the original MLX */ -int mlx_mouse_move(void* mlx, void* win, int x, int y); +MLX_API int mlx_mouse_move(void* mlx, void* win, int x, int y); /** * @brief Get cursor's position @@ -113,7 +127,7 @@ int mlx_mouse_move(void* mlx, void* win, int x, int y); * * @return (int) Always return 0, made this to copy the behaviour of the original MLX */ -int mlx_mouse_get_pos(void* mlx, int* x, int* y); +MLX_API int mlx_mouse_get_pos(void* mlx, int* x, int* y); /** @@ -127,7 +141,7 @@ int mlx_mouse_get_pos(void* mlx, int* x, int* y); * * @return (int) Always return 0, made this to copy the behaviour of the original MLX */ -int mlx_on_event(void* mlx, void* win, mlx_event_type event, int (*f)(), void* param); +MLX_API int mlx_on_event(void* mlx, void* win, mlx_event_type event, int (*f)(int, void*), void* param); /** @@ -144,7 +158,7 @@ int mlx_on_event(void* mlx, void* win, mlx_event_type event, int (*f)(), void* p * * @return (int) Always return 0, made this to copy the behaviour of the original MLX */ -int mlx_pixel_put(void* mlx, void* win, int x, int y, int color); +MLX_API int mlx_pixel_put(void* mlx, void* win, int x, int y, int color); /** @@ -156,7 +170,7 @@ int mlx_pixel_put(void* mlx, void* win, int x, int y, int color); * * @return (void*) An opaque pointer to the internal image or NULL (0x0) in case of error */ -void* mlx_new_image(void* mlx, int width, int height); +MLX_API void* mlx_new_image(void* mlx, int width, int height); /** * @brief Get image pixel data @@ -176,7 +190,7 @@ void* mlx_new_image(void* mlx, int width, int height); * ~ make IMAGES_OPTIMIZED=false * ``` */ -int mlx_get_image_pixel(void* mlx, void* img, int x, int y); +MLX_API int mlx_get_image_pixel(void* mlx, void* img, int x, int y); /** * @brief Set image pixel data @@ -197,7 +211,7 @@ int mlx_get_image_pixel(void* mlx, void* img, int x, int y); * ~ make IMAGES_OPTIMIZED=false * ``` */ -void mlx_set_image_pixel(void* mlx, void* img, int x, int y, int color); +MLX_API void mlx_set_image_pixel(void* mlx, void* img, int x, int y, int color); /** * @brief Put image to the given window @@ -210,7 +224,7 @@ void mlx_set_image_pixel(void* mlx, void* img, int x, int y, int color); * * @return (int) Always return 0, made this to copy the behaviour of the original MLX */ -int mlx_put_image_to_window(void* mlx, void* win, void* img, int x, int y); +MLX_API int mlx_put_image_to_window(void* mlx, void* win, void* img, int x, int y); /** * @brief Destroys internal image @@ -220,7 +234,7 @@ int mlx_put_image_to_window(void* mlx, void* win, void* img, int x, int y); * * @return (int) Always return 0, made this to copy the behaviour of the original MLX */ -int mlx_destroy_image(void* mlx, void* img); +MLX_API int mlx_destroy_image(void* mlx, void* img); /** @@ -233,7 +247,7 @@ int mlx_destroy_image(void* mlx, void* img); * * @return (void*) An opaque pointer to the internal image or NULL (0x0) in case of error */ -void* mlx_png_file_to_image(void* mlx, char* filename, int* width, int* height); +MLX_API void* mlx_png_file_to_image(void* mlx, char* filename, int* width, int* height); /** * @brief Create a new image from a jpg file @@ -245,7 +259,7 @@ void* mlx_png_file_to_image(void* mlx, char* filename, int* width, int* height); * * @return (void*) An opaque pointer to the internal image or NULL (0x0) in case of error */ -void* mlx_jpg_file_to_image(void* mlx, char* filename, int* width, int* height); +MLX_API void* mlx_jpg_file_to_image(void* mlx, char* filename, int* width, int* height); /** * @brief Create a new image from a bmp file @@ -257,7 +271,7 @@ void* mlx_jpg_file_to_image(void* mlx, char* filename, int* width, int* height); * * @return (void*) An opaque pointer to the internal image or NULL (0x0) in case of error */ -void* mlx_bmp_file_to_image(void* mlx, char* filename, int* width, int* height); +MLX_API void* mlx_bmp_file_to_image(void* mlx, char* filename, int* width, int* height); /** @@ -272,7 +286,7 @@ void* mlx_bmp_file_to_image(void* mlx, char* filename, int* width, int* height); * * @return (int) Always return 0, made this to copy the behaviour of the original MLX */ -int mlx_string_put(void* mlx, void* win, int x, int y, int color, char* str); +MLX_API int mlx_string_put(void* mlx, void* win, int x, int y, int color, char* str); /** @@ -284,7 +298,7 @@ int mlx_string_put(void* mlx, void* win, int x, int y, int color, char* str); * * @return (void) */ -void mlx_set_font(void* mlx, void* win, char* filepath); +MLX_API void mlx_set_font(void* mlx, void* win, char* filepath); /** * @brief Loads a font to be used by `mlx_string_put` and scales it @@ -296,7 +310,7 @@ void mlx_set_font(void* mlx, void* win, char* filepath); * * @return (void) */ -void mlx_set_font_scale(void* mlx, void* win, char* filepath, float scale); +MLX_API void mlx_set_font_scale(void* mlx, void* win, char* filepath, float scale); /** @@ -307,7 +321,7 @@ void mlx_set_font_scale(void* mlx, void* win, char* filepath, float scale); * * @return (int) Always return 0, made this to copy the behaviour of the original MLX */ -int mlx_clear_window(void* mlx, void* win); +MLX_API int mlx_clear_window(void* mlx, void* win); /** @@ -318,7 +332,7 @@ int mlx_clear_window(void* mlx, void* win); * * @return (int) Always return 0, made this to copy the behaviour of the original MLX */ -int mlx_destroy_window(void* mlx, void* win); +MLX_API int mlx_destroy_window(void* mlx, void* win); /** * @brief Destroy internal MLX application @@ -327,7 +341,7 @@ int mlx_destroy_window(void* mlx, void* win); * * @return (int) Always return 0, made this to copy the behaviour of the original MLX */ -int mlx_destroy_display(void* mlx); +MLX_API int mlx_destroy_display(void* mlx); /** @@ -339,7 +353,7 @@ int mlx_destroy_display(void* mlx); * * @return (int) Always return 0, made this to copy the behaviour of the original MLX */ -int mlx_get_screens_size(void* mlx, int* w, int* h); +MLX_API int mlx_get_screens_size(void* mlx, int* w, int* h); #ifdef __cplusplus } diff --git a/res/screenshot_test_windows.png b/res/screenshot_test_windows.png new file mode 100644 index 0000000..65f5771 Binary files /dev/null and b/res/screenshot_test_windows.png differ diff --git a/src/core/application.cpp b/src/core/application.cpp index ba33ccf..a7c3749 100644 --- a/src/core/application.cpp +++ b/src/core/application.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 22:10:52 by maldavid #+# #+# */ -/* Updated: 2023/11/20 07:29:12 by maldavid ### ########.fr */ +/* Updated: 2023/12/09 17:44:13 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -35,7 +35,7 @@ namespace mlx::core if(_loop_hook) _loop_hook(_param); - + for(auto& gs : _graphics) gs->endRender(); } @@ -66,6 +66,7 @@ namespace mlx::core Application::~Application() { + SDL_QuitSubSystem(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_EVENTS); SDL_Quit(); } } diff --git a/src/core/application.h b/src/core/application.h index 007e525..a877086 100644 --- a/src/core/application.h +++ b/src/core/application.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 21:49:46 by maldavid #+# #+# */ -/* Updated: 2023/11/23 14:25:43 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 18:52:47 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -24,6 +24,7 @@ #include #include +#include namespace mlx::core { diff --git a/src/core/bridge.cpp b/src/core/bridge.cpp index 9240ddc..854d9f5 100644 --- a/src/core/bridge.cpp +++ b/src/core/bridge.cpp @@ -15,6 +15,7 @@ #include "application.h" #include #include +#include extern "C" { @@ -31,29 +32,29 @@ extern "C" if(app == nullptr) mlx::core::error::report(e_kind::fatal_error, "Tout a pÊtÊ"); init = true; - return app; + return static_cast(app); } - void* mlx_new_window(mlx::core::Application* mlx, int w, int h, const char* title) + void* mlx_new_window(void* mlx, int w, int h, const char* title) { - return mlx->newGraphicsSuport(w, h, title); + return static_cast(mlx)->newGraphicsSuport(w, h, title); } - int mlx_loop_hook(mlx::core::Application* mlx, int (*f)(void*), void* param) + int mlx_loop_hook(void* mlx, int (*f)(void*), void* param) { - mlx->loopHook(f, param); + static_cast(mlx)->loopHook(f, param); return 0; } - int mlx_loop(mlx::core::Application* mlx) + int mlx_loop(void* mlx) { - mlx->run(); + static_cast(mlx)->run(); return 0; } - int mlx_loop_end(mlx::core::Application* mlx) + int mlx_loop_end(void* mlx) { - mlx->loopEnd(); + static_cast(mlx)->loopEnd(); return 0; } @@ -67,57 +68,57 @@ extern "C" return SDL_ShowCursor(SDL_DISABLE); } - int mlx_mouse_move(mlx::core::Application* mlx, void* win, int x, int y) + int mlx_mouse_move(void* mlx, void* win, int x, int y) { - mlx->mouseMove(win, x, y); + static_cast(mlx)->mouseMove(win, x, y); return 0; } - int mlx_mouse_get_pos(mlx::core::Application* mlx, int* x, int* y) + int mlx_mouse_get_pos(void* mlx, int* x, int* y) { - mlx->getMousePos(x, y); + static_cast(mlx)->getMousePos(x, y); return 0; } - int mlx_on_event(mlx::core::Application* mlx, void* win, int event, int (*funct_ptr)(int, void*), void* param) + int mlx_on_event(void* mlx, void* win, mlx_event_type event, int (*funct_ptr)(int, void*), void* param) { - mlx->onEvent(win, event, funct_ptr, param); + static_cast(mlx)->onEvent(win, static_cast(event), funct_ptr, param); return 0; } - void* mlx_new_image(mlx::core::Application* mlx, int width, int height) + void* mlx_new_image(void* mlx, int width, int height) { - return mlx->newTexture(width, height); + return static_cast(mlx)->newTexture(width, height); } - int mlx_get_image_pixel(mlx::core::Application* mlx, void* img, int x, int y) + int mlx_get_image_pixel(void* mlx, void* img, int x, int y) { - return mlx->getTexturePixel(img, x, y); + return static_cast(mlx)->getTexturePixel(img, x, y); } - void mlx_set_image_pixel(mlx::core::Application* mlx, void* img, int x, int y, int color) + void mlx_set_image_pixel(void* mlx, void* img, int x, int y, int color) { unsigned char color_bits[4]; color_bits[0] = (color & 0x00FF0000) >> 16; color_bits[1] = (color & 0x0000FF00) >> 8; color_bits[2] = (color & 0x000000FF); color_bits[3] = (color & 0xFF000000) >> 24; - mlx->setTexturePixel(img, x, y, *reinterpret_cast(color_bits)); + static_cast(mlx)->setTexturePixel(img, x, y, *reinterpret_cast(color_bits)); } - int mlx_put_image_to_window(mlx::core::Application* mlx, void* win, void* img, int x, int y) + int mlx_put_image_to_window(void* mlx, void* win, void* img, int x, int y) { - mlx->texturePut(win, img, x, y); + static_cast(mlx)->texturePut(win, img, x, y); return 0; } - int mlx_destroy_image(mlx::core::Application* mlx, void* img) + int mlx_destroy_image(void* mlx, void* img) { - mlx->destroyTexture(img); + static_cast(mlx)->destroyTexture(img); return 0; } - void* mlx_png_file_to_image(mlx::core::Application* mlx, char* filename, int* width, int* height) + void* mlx_png_file_to_image(void* mlx, char* filename, int* width, int* height) { std::filesystem::path file(filename); if(file.extension() != ".png") @@ -125,10 +126,10 @@ extern "C" mlx::core::error::report(e_kind::error, "PNG loader : not a png file '%s'", filename); return nullptr; } - return mlx->newStbTexture(filename, width, height); + return static_cast(mlx)->newStbTexture(filename, width, height); } - void* mlx_jpg_file_to_image(mlx::core::Application* mlx, char* filename, int* width, int* height) + void* mlx_jpg_file_to_image(void* mlx, char* filename, int* width, int* height) { std::filesystem::path file(filename); if(file.extension() != ".jpg" && file.extension() != ".jpeg") @@ -136,10 +137,10 @@ extern "C" mlx::core::error::report(e_kind::error, "JPG loader : not a jpg file '%s'", filename); return nullptr; } - return mlx->newStbTexture(filename, width, height); + return static_cast(mlx)->newStbTexture(filename, width, height); } - void* mlx_bmp_file_to_image(mlx::core::Application* mlx, char* filename, int* width, int* height) + void* mlx_bmp_file_to_image(void* mlx, char* filename, int* width, int* height) { std::filesystem::path file(filename); if(file.extension() != ".bmp" && file.extension() != ".dib") @@ -147,32 +148,32 @@ extern "C" mlx::core::error::report(e_kind::error, "BMP loader : not a bmp file '%s'", filename); return nullptr; } - return mlx->newStbTexture(filename, width, height); + return static_cast(mlx)->newStbTexture(filename, width, height); } - int mlx_pixel_put(mlx::core::Application* mlx, void* win, int x, int y, int color) + int mlx_pixel_put(void* mlx, void* win, int x, int y, int color) { unsigned char color_bits[4]; color_bits[0] = (color & 0x00FF0000) >> 16; color_bits[1] = (color & 0x0000FF00) >> 8; color_bits[2] = color & 0x000000FF; color_bits[3] = 0xFF; - mlx->pixelPut(win, x, y, *reinterpret_cast(color_bits)); + static_cast(mlx)->pixelPut(win, x, y, *reinterpret_cast(color_bits)); return 0; } - int mlx_string_put(mlx::core::Application* mlx, void* win, int x, int y, int color, char* str) + int mlx_string_put(void* mlx, void* win, int x, int y, int color, char* str) { unsigned char color_bits[4]; color_bits[0] = (color & 0x00FF0000) >> 16; color_bits[1] = (color & 0x0000FF00) >> 8; color_bits[2] = color & 0x000000FF; color_bits[3] = 0xFF; - mlx->stringPut(win, x, y, *reinterpret_cast(color_bits), str); + static_cast(mlx)->stringPut(win, x, y, *reinterpret_cast(color_bits), str); return 0; } - void mlx_set_font(mlx::core::Application* mlx, void* win, char* filepath) + void mlx_set_font(void* mlx, void* win, char* filepath) { std::filesystem::path file(filepath); if(file.extension() != ".ttf" && file.extension() != ".tte") @@ -180,10 +181,10 @@ extern "C" mlx::core::error::report(e_kind::error, "TTF loader : not a truetype font file '%s'", filepath); return; } - mlx->loadFont(win, file, 16.f); + static_cast(mlx)->loadFont(win, file, 16.f); } - void mlx_set_font_scale(mlx::core::Application* mlx, void* win, char* filepath, float scale) + void mlx_set_font_scale(void* mlx, void* win, char* filepath, float scale) { std::filesystem::path file(filepath); if(file.extension() != ".ttf" && file.extension() != ".tte") @@ -191,31 +192,31 @@ extern "C" mlx::core::error::report(e_kind::error, "TTF loader : not a truetype font file '%s'", filepath); return; } - mlx->loadFont(win, file, scale); + static_cast(mlx)->loadFont(win, file, scale); } - int mlx_clear_window(mlx::core::Application* mlx, void* win) + int mlx_clear_window(void* mlx, void* win) { - mlx->clearGraphicsSupport(win); + static_cast(mlx)->clearGraphicsSupport(win); return 0; } - int mlx_destroy_window(mlx::core::Application* mlx, void* win) + int mlx_destroy_window(void* mlx, void* win) { - mlx->destroyGraphicsSupport(win); + static_cast(mlx)->destroyGraphicsSupport(win); return 0; } - int mlx_destroy_display(mlx::core::Application* mlx) + int mlx_destroy_display(void* mlx) { - delete mlx; + delete static_cast(mlx); mlx::Render_Core::get().destroy(); return 0; } - int mlx_get_screens_size(mlx::core::Application* mlx, int* w, int* h) + int mlx_get_screens_size(void* mlx, int* w, int* h) { - mlx->getScreenSize(w, h); + static_cast(mlx)->getScreenSize(w, h); return 0; } -} +} \ No newline at end of file diff --git a/src/core/errors.h b/src/core/errors.h index b11db46..d8f5ba1 100644 --- a/src/core/errors.h +++ b/src/core/errors.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 17:42:32 by maldavid #+# #+# */ -/* Updated: 2022/10/08 19:06:41 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 18:53:11 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,6 +14,7 @@ #define __MLX_ERRORS__ #include +#include enum class e_kind { diff --git a/src/core/graphics.cpp b/src/core/graphics.cpp index 0ef2dba..a66e140 100644 --- a/src/core/graphics.cpp +++ b/src/core/graphics.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/02 15:13:55 by maldavid #+# #+# */ -/* Updated: 2023/11/24 20:42:15 by maldavid ### ########.fr */ +/* Updated: 2023/12/09 16:52:08 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -77,5 +77,6 @@ namespace mlx _text_put_pipeline->destroy(); _pixel_put_pipeline.destroy(); _renderer->destroy(); + _window->destroy(); } } diff --git a/src/core/graphics.h b/src/core/graphics.h index 6c19aaa..2680162 100644 --- a/src/core/graphics.h +++ b/src/core/graphics.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/02 14:49:49 by maldavid #+# #+# */ -/* Updated: 2023/11/25 09:59:39 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:04:59 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -26,6 +26,7 @@ #include #include #include +#include namespace mlx { diff --git a/src/core/memory.h b/src/core/memory.h index 5e8c3eb..b4649e1 100644 --- a/src/core/memory.h +++ b/src/core/memory.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/12/07 16:31:51 by kbz_8 #+# #+# */ -/* Updated: 2023/12/08 12:56:21 by kbz_8 ### ########.fr */ +/* Updated: 2023/12/08 19:05:15 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,6 +14,7 @@ #define __MLX_MEMORY__ #include +#include #include namespace mlx diff --git a/src/core/profile.h b/src/core/profile.h index c5e45a2..45d6ed7 100644 --- a/src/core/profile.h +++ b/src/core/profile.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/10 08:49:17 by maldavid #+# #+# */ -/* Updated: 2023/11/10 09:05:56 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 18:49:38 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -41,6 +41,19 @@ #warning "This compiler is not fully supported" #endif +#if defined(_WIN32) || defined(__CYGWIN__) + #define MLX_PLAT_WINDOWS +#elif defined(__linux__) + #define MLX_PLAT_LINUX +#elif defined(__APPLE__) && defined(__MACH__) + #define MLX_PLAT_MACOS +#elif defined(unix) || defined(__unix__) || defined(__unix) + #define MLX_PLAT_UNIX +#else + #error "Unknown environment!" +#endif + + // Checking common assumptions #include #include diff --git a/src/platform/inputs.h b/src/platform/inputs.h index 030171c..332d8e0 100644 --- a/src/platform/inputs.h +++ b/src/platform/inputs.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/05 16:27:35 by maldavid #+# #+# */ -/* Updated: 2023/12/08 12:14:39 by kbz_8 ### ########.fr */ +/* Updated: 2023/12/08 18:54:03 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -18,6 +18,8 @@ #include #include +#include + #include "window.h" namespace mlx diff --git a/src/platform/window.cpp b/src/platform/window.cpp index ffbbbca..c3e712f 100644 --- a/src/platform/window.cpp +++ b/src/platform/window.cpp @@ -6,13 +6,14 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 17:36:44 by maldavid #+# #+# */ -/* Updated: 2023/11/25 11:48:26 by maldavid ### ########.fr */ +/* Updated: 2023/12/09 16:52:29 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ #include #include #include +#include namespace mlx { @@ -40,14 +41,16 @@ namespace mlx void MLX_Window::destroy() noexcept { - if(_win) + std::cout << "prout" << std::endl; + if(_win != nullptr) + { SDL_DestroyWindow(_win); - if(_icon) + _win = nullptr; + } + if(_icon != nullptr) + { SDL_FreeSurface(_icon); - } - - MLX_Window::~MLX_Window() - { - destroy(); + _icon = nullptr; + } } } diff --git a/src/platform/window.h b/src/platform/window.h index fa445ca..f1c7f16 100644 --- a/src/platform/window.h +++ b/src/platform/window.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 21:53:12 by maldavid #+# #+# */ -/* Updated: 2023/11/25 11:33:32 by maldavid ### ########.fr */ +/* Updated: 2023/12/09 16:35:57 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,6 +15,7 @@ #include #include +#include namespace mlx { @@ -30,7 +31,7 @@ namespace mlx void destroy() noexcept; - ~MLX_Window(); + ~MLX_Window() = default; private: SDL_Surface* _icon = nullptr; diff --git a/src/renderer/buffers/vk_buffer.h b/src/renderer/buffers/vk_buffer.h index 3cad686..783c486 100644 --- a/src/renderer/buffers/vk_buffer.h +++ b/src/renderer/buffers/vk_buffer.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/06 23:18:52 by maldavid #+# #+# */ -/* Updated: 2023/11/16 13:56:19 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:05:50 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,6 +15,7 @@ #include #include +#include namespace mlx { diff --git a/src/renderer/buffers/vk_ibo.h b/src/renderer/buffers/vk_ibo.h index 92f8c09..ecaa21f 100644 --- a/src/renderer/buffers/vk_ibo.h +++ b/src/renderer/buffers/vk_ibo.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/01/25 15:05:05 by maldavid #+# #+# */ -/* Updated: 2023/11/14 03:25:59 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:06:07 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,6 +16,7 @@ #include #include "vk_buffer.h" #include +#include namespace mlx { diff --git a/src/renderer/buffers/vk_ubo.h b/src/renderer/buffers/vk_ubo.h index f1ca457..057e24e 100644 --- a/src/renderer/buffers/vk_ubo.h +++ b/src/renderer/buffers/vk_ubo.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/06 18:45:29 by maldavid #+# #+# */ -/* Updated: 2023/11/14 03:26:10 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:06:28 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,6 +16,7 @@ #include "vk_buffer.h" #include #include +#include namespace mlx { diff --git a/src/renderer/buffers/vk_vbo.h b/src/renderer/buffers/vk_vbo.h index a8c942c..7b52c76 100644 --- a/src/renderer/buffers/vk_vbo.h +++ b/src/renderer/buffers/vk_vbo.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/06 18:27:38 by maldavid #+# #+# */ -/* Updated: 2023/11/14 04:53:36 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:06:45 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,6 +15,7 @@ #include "vk_buffer.h" #include +#include namespace mlx { diff --git a/src/renderer/command/cmd_manager.h b/src/renderer/command/cmd_manager.h index 4920d69..e6a13be 100644 --- a/src/renderer/command/cmd_manager.h +++ b/src/renderer/command/cmd_manager.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/02 17:48:52 by maldavid #+# #+# */ -/* Updated: 2023/04/02 17:50:48 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:07:00 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,6 +16,7 @@ #include #include +#include #include #include #include diff --git a/src/renderer/command/vk_cmd_buffer.h b/src/renderer/command/vk_cmd_buffer.h index ee6d8df..0b4e742 100644 --- a/src/renderer/command/vk_cmd_buffer.h +++ b/src/renderer/command/vk_cmd_buffer.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/06 18:25:42 by maldavid #+# #+# */ -/* Updated: 2023/04/21 13:20:49 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:07:11 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,6 +15,7 @@ #include #include +#include namespace mlx { diff --git a/src/renderer/command/vk_cmd_pool.h b/src/renderer/command/vk_cmd_pool.h index 5445150..cacc651 100644 --- a/src/renderer/command/vk_cmd_pool.h +++ b/src/renderer/command/vk_cmd_pool.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/06 18:24:12 by maldavid #+# #+# */ -/* Updated: 2022/12/18 01:08:31 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:07:22 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,6 +14,7 @@ #define __MLX_VK_CMD_POOL__ #include +#include namespace mlx { diff --git a/src/renderer/core/memory.h b/src/renderer/core/memory.h index bb3e2b7..671a90b 100644 --- a/src/renderer/core/memory.h +++ b/src/renderer/core/memory.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/10/20 02:13:03 by maldavid #+# #+# */ -/* Updated: 2023/11/14 09:46:32 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:07:34 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,6 +15,7 @@ #include #include +#include namespace mlx { diff --git a/src/renderer/core/render_core.cpp b/src/renderer/core/render_core.cpp index 13e46cc..aa8ec23 100644 --- a/src/renderer/core/render_core.cpp +++ b/src/renderer/core/render_core.cpp @@ -24,7 +24,11 @@ #include #ifdef DEBUG - #warning "MLX is being compiled in debug mode, this activates Vulkan's validation layers and debug messages which may impact rendering performances" + #ifndef MLX_COMPILER_MSVC + #warning "MLX is being compiled in debug mode, this activates Vulkan's validation layers and debug messages which may impact rendering performances" + #else + #pragma NOTE("MLX is being compiled in debug mode, this activates Vulkan's validation layers and debug messages which may impact rendering performances") + #endif #endif namespace mlx diff --git a/src/renderer/core/render_core.h b/src/renderer/core/render_core.h index 94b8c56..8319cca 100644 --- a/src/renderer/core/render_core.h +++ b/src/renderer/core/render_core.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/08 19:16:32 by maldavid #+# #+# */ -/* Updated: 2023/11/20 07:20:43 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 18:53:36 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -24,6 +24,7 @@ #include #include +#include namespace mlx { diff --git a/src/renderer/core/vk_device.h b/src/renderer/core/vk_device.h index 4078c96..c2353af 100644 --- a/src/renderer/core/vk_device.h +++ b/src/renderer/core/vk_device.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/08 19:13:42 by maldavid #+# #+# */ -/* Updated: 2023/11/11 01:51:26 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:07:49 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,6 +15,7 @@ #include #include "vk_queues.h" +#include namespace mlx { diff --git a/src/renderer/core/vk_fence.h b/src/renderer/core/vk_fence.h index a72cd02..342ce78 100644 --- a/src/renderer/core/vk_fence.h +++ b/src/renderer/core/vk_fence.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/02 17:52:09 by maldavid #+# #+# */ -/* Updated: 2023/04/02 17:52:59 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:08:01 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,6 +14,7 @@ #define __MLX_VK_FENCE__ #include +#include #include namespace mlx diff --git a/src/renderer/core/vk_instance.h b/src/renderer/core/vk_instance.h index dc6e216..d5de82d 100644 --- a/src/renderer/core/vk_instance.h +++ b/src/renderer/core/vk_instance.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/08 19:03:04 by maldavid #+# #+# */ -/* Updated: 2022/12/18 17:42:08 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:08:14 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,6 +15,7 @@ #include #include +#include namespace mlx { diff --git a/src/renderer/core/vk_queues.h b/src/renderer/core/vk_queues.h index 5ed1b56..1716999 100644 --- a/src/renderer/core/vk_queues.h +++ b/src/renderer/core/vk_queues.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/08 19:01:49 by maldavid #+# #+# */ -/* Updated: 2022/12/18 22:44:37 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:08:25 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,6 +16,7 @@ #include #include #include +#include namespace mlx { diff --git a/src/renderer/core/vk_semaphore.h b/src/renderer/core/vk_semaphore.h index 8c1371e..9ae964f 100644 --- a/src/renderer/core/vk_semaphore.h +++ b/src/renderer/core/vk_semaphore.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/08 18:59:38 by maldavid #+# #+# */ -/* Updated: 2023/04/02 17:55:10 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:08:36 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,6 +15,7 @@ #include #include +#include namespace mlx { diff --git a/src/renderer/core/vk_surface.h b/src/renderer/core/vk_surface.h index a39de21..24dd3ec 100644 --- a/src/renderer/core/vk_surface.h +++ b/src/renderer/core/vk_surface.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/08 18:57:55 by maldavid #+# #+# */ -/* Updated: 2022/12/18 19:34:04 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:08:49 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,6 +15,7 @@ #include #include +#include namespace mlx { diff --git a/src/renderer/core/vk_validation_layers.h b/src/renderer/core/vk_validation_layers.h index 8fb08c0..a956674 100644 --- a/src/renderer/core/vk_validation_layers.h +++ b/src/renderer/core/vk_validation_layers.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/12/19 14:04:25 by maldavid #+# #+# */ -/* Updated: 2022/12/19 14:05:19 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:09:02 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,6 +14,7 @@ #define __VK_VALIDATION_LAYERS__ #include +#include namespace mlx { diff --git a/src/renderer/descriptors/vk_descriptor_pool.h b/src/renderer/descriptors/vk_descriptor_pool.h index 115cecb..7a97760 100644 --- a/src/renderer/descriptors/vk_descriptor_pool.h +++ b/src/renderer/descriptors/vk_descriptor_pool.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/01/23 18:32:43 by maldavid #+# #+# */ -/* Updated: 2023/01/23 18:44:40 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:09:20 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,6 +15,7 @@ #include #include +#include namespace mlx { diff --git a/src/renderer/descriptors/vk_descriptor_set.h b/src/renderer/descriptors/vk_descriptor_set.h index 0d39d72..d9c51d3 100644 --- a/src/renderer/descriptors/vk_descriptor_set.h +++ b/src/renderer/descriptors/vk_descriptor_set.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/01/23 18:39:36 by maldavid #+# #+# */ -/* Updated: 2023/12/07 19:47:07 by kbz_8 ### ########.fr */ +/* Updated: 2023/12/08 19:09:31 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,6 +15,7 @@ #include #include +#include #include namespace mlx diff --git a/src/renderer/descriptors/vk_descriptor_set_layout.h b/src/renderer/descriptors/vk_descriptor_set_layout.h index 4066a1f..23d2ef2 100644 --- a/src/renderer/descriptors/vk_descriptor_set_layout.h +++ b/src/renderer/descriptors/vk_descriptor_set_layout.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/01/23 18:36:22 by maldavid #+# #+# */ -/* Updated: 2023/03/31 17:54:03 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:09:44 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -17,6 +17,7 @@ #include #include #include +#include namespace mlx { diff --git a/src/renderer/images/texture.h b/src/renderer/images/texture.h index c324dd6..e15b5fc 100644 --- a/src/renderer/images/texture.h +++ b/src/renderer/images/texture.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/03/08 02:24:58 by maldavid #+# #+# */ -/* Updated: 2023/11/25 10:01:35 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:10:09 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -21,6 +21,7 @@ #include #include #include +#include namespace mlx { diff --git a/src/renderer/images/texture_atlas.h b/src/renderer/images/texture_atlas.h index 74c7c90..59a0edc 100644 --- a/src/renderer/images/texture_atlas.h +++ b/src/renderer/images/texture_atlas.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/07 16:36:33 by maldavid #+# #+# */ -/* Updated: 2023/12/07 18:50:53 by kbz_8 ### ########.fr */ +/* Updated: 2023/12/08 19:10:22 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,6 +16,7 @@ #include #include #include +#include namespace mlx { diff --git a/src/renderer/images/vk_image.h b/src/renderer/images/vk_image.h index 8fba630..7e0e865 100644 --- a/src/renderer/images/vk_image.h +++ b/src/renderer/images/vk_image.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/01/25 11:54:21 by maldavid #+# #+# */ -/* Updated: 2023/11/18 17:10:05 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:10:38 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -18,6 +18,7 @@ #include #include #include +#include namespace mlx { diff --git a/src/renderer/pipeline/pipeline.h b/src/renderer/pipeline/pipeline.h index b8e6cf8..6dbfe7a 100644 --- a/src/renderer/pipeline/pipeline.h +++ b/src/renderer/pipeline/pipeline.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/12/18 21:23:52 by maldavid #+# #+# */ -/* Updated: 2022/12/19 00:27:29 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:10:51 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,6 +14,7 @@ #define __PIPELINE__ #include +#include #include namespace mlx diff --git a/src/renderer/pixel_put.h b/src/renderer/pixel_put.h index 0742fa5..503bf62 100644 --- a/src/renderer/pixel_put.h +++ b/src/renderer/pixel_put.h @@ -6,13 +6,14 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/03/31 13:18:50 by maldavid #+# #+# */ -/* Updated: 2023/08/02 05:27:27 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:11:43 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ #ifndef __MLX_PIXEL_PUT__ #define __MLX_PIXEL_PUT__ +#include #include #include diff --git a/src/renderer/renderer.h b/src/renderer/renderer.h index aaf3646..42b8db9 100644 --- a/src/renderer/renderer.h +++ b/src/renderer/renderer.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/12/18 17:14:45 by maldavid #+# #+# */ -/* Updated: 2023/11/20 07:26:12 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:12:06 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -31,6 +31,7 @@ #include #include +#include #include diff --git a/src/renderer/renderpass/vk_framebuffer.h b/src/renderer/renderpass/vk_framebuffer.h index ac1d3c5..d8c92ed 100644 --- a/src/renderer/renderpass/vk_framebuffer.h +++ b/src/renderer/renderpass/vk_framebuffer.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/06 18:19:44 by maldavid #+# #+# */ -/* Updated: 2023/11/18 16:44:16 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:11:04 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,6 +14,7 @@ #define __MLX_VK_FRAMEBUFFER__ #include +#include namespace mlx { diff --git a/src/renderer/renderpass/vk_render_pass.h b/src/renderer/renderpass/vk_render_pass.h index 2caca3a..c955800 100644 --- a/src/renderer/renderpass/vk_render_pass.h +++ b/src/renderer/renderpass/vk_render_pass.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/06 18:22:00 by maldavid #+# #+# */ -/* Updated: 2023/11/20 07:24:48 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:11:14 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,6 +14,7 @@ #define __MLX_VK_RENDER_PASS__ #include +#include namespace mlx { diff --git a/src/renderer/swapchain/vk_swapchain.h b/src/renderer/swapchain/vk_swapchain.h index 4369a55..b6b8374 100644 --- a/src/renderer/swapchain/vk_swapchain.h +++ b/src/renderer/swapchain/vk_swapchain.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/06 18:23:27 by maldavid #+# #+# */ -/* Updated: 2023/11/20 07:25:30 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:11:30 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,6 +15,7 @@ #include #include +#include #include namespace mlx diff --git a/src/renderer/text_library.h b/src/renderer/text_library.h index fd1079f..aa124c3 100644 --- a/src/renderer/text_library.h +++ b/src/renderer/text_library.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/10 11:52:30 by maldavid #+# #+# */ -/* Updated: 2023/04/12 11:38:57 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:12:24 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -20,6 +20,7 @@ #include #include #include +#include namespace mlx { diff --git a/src/renderer/text_pipeline.h b/src/renderer/text_pipeline.h index 5f4c32e..e1e29ec 100644 --- a/src/renderer/text_pipeline.h +++ b/src/renderer/text_pipeline.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/06 16:24:11 by maldavid #+# #+# */ -/* Updated: 2023/11/24 19:08:04 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:12:40 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -20,6 +20,7 @@ #include #include #include +#include namespace mlx { diff --git a/src/utils/dogica_ttf.h b/src/utils/dogica_ttf.h index 01c13fe..a2907d3 100644 --- a/src/utils/dogica_ttf.h +++ b/src/utils/dogica_ttf.h @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/11 16:20:25 by maldavid #+# #+# */ -/* Updated: 2023/11/25 10:47:10 by maldavid ### ########.fr */ +/* Updated: 2023/12/08 19:13:00 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/test/main.c b/test/main.c index e1e107b..12e13a2 100644 --- a/test/main.c +++ b/test/main.c @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 17:55:21 by maldavid #+# #+# */ -/* Updated: 2023/12/08 12:23:07 by kbz_8 ### ########.fr */ +/* Updated: 2023/12/08 18:08:13 by kbz_8 ### ########.fr */ /* */ /* ************************************************************************** */ @@ -22,12 +22,14 @@ typedef struct s_mlx void *img; } t_mlx; -int update(t_mlx *mlx) +int update(void *param) { static int i = 0; int j; int k; + t_mlx *mlx; + mlx = (t_mlx *)param; mlx_put_image_to_window(mlx->mlx, mlx->win, mlx->logo, 100, 100); mlx_put_image_to_window(mlx->mlx, mlx->win, mlx->img, 150, 60); mlx_string_put(mlx->mlx, mlx->win, 20, 50, 0xFFFFFFFF, "that's a text"); @@ -41,8 +43,7 @@ int update(t_mlx *mlx) k++; j++; } - i++; - if (i == 5000) + if (++i == 5000) { mlx_clear_window(mlx->mlx, mlx->win); mlx_set_font_scale(mlx->mlx, mlx->win, "font.ttf", 16.f); @@ -79,17 +80,17 @@ void *create_image(t_mlx *mlx) return (img); } -int key_hook(int key, t_mlx *param) +int key_hook(int key, void *param) { if (key == 41) - mlx_loop_end(param->mlx); + mlx_loop_end(((t_mlx *)param)->mlx); return (0); } -int window_hook(int event, t_mlx *param) +int window_hook(int event, void *param) { if (event == 0) - mlx_loop_end(param->mlx); + mlx_loop_end(((t_mlx *)param)->mlx); return (0); } diff --git a/valgrind.supp b/valgrind.supp new file mode 100644 index 0000000..ed92da5 --- /dev/null +++ b/valgrind.supp @@ -0,0 +1,3246 @@ +{ + name + Memcheck:Leak + fun:*alloc + ... + obj:*libmlx* + ... +} +{ + name + Memcheck:Leak + fun:*alloc + ... + obj:*SDL* + ... +} +{ + name + Memcheck:Leak + fun:*alloc + ... + obj:*X11* + ... +} +{ + name + Memcheck:Leak + fun:*alloc + ... + obj:*libGLX_nvidia.so* + ... +} +{ + name + Memcheck:ReallocZero + fun:realloc + ... + obj:*libGLX_nvidia.so* + ... +} +{ + name + Memcheck:BadSize + fun:posix_memalign + ... + obj:*libGLX_nvidia.so* + ... +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + fun:strdup + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + fun:strdup + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + fun:strdup + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + fun:strdup + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: definite + fun:realloc + obj:* + obj:* + obj:* + obj:* + fun:SDL_DBus_Init_Spinlocked.lto_priv.0 + fun:UnknownInlinedFun + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + fun:strdup + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + fun:SDL_DBus_Init_Spinlocked.lto_priv.0 + fun:UnknownInlinedFun + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + fun:SDL_DBus_Init_Spinlocked.lto_priv.0 + fun:UnknownInlinedFun + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:SDL_DBus_Init_Spinlocked.lto_priv.0 + fun:UnknownInlinedFun + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + obj:* + obj:* + fun:SDL_DBus_Init_Spinlocked.lto_priv.0 + fun:UnknownInlinedFun + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + obj:* + obj:* + fun:SDL_DBus_Init_Spinlocked.lto_priv.0 + fun:UnknownInlinedFun + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + obj:* + obj:* + fun:SDL_DBus_Init_Spinlocked.lto_priv.0 + fun:UnknownInlinedFun + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: reachable + fun:realloc + fun:SDL_GetErrBuf + fun:SDL_SetError_REAL + fun:destroy + fun:_ZN3mlx10MLX_WindowD1Ev + fun:_M_release + fun:~__shared_count + fun:~__shared_ptr + fun:~pair + fun:destroy > > + fun:destroy > > + fun:_M_deallocate_node + fun:_M_deallocate_nodes + fun:clear + fun:_ZNSt10_HashtableIjSt4pairIKjSt10shared_ptrIN3mlx10MLX_WindowEEESaIS6_ENSt8__detail10_Select1stESt8equal_toIjESt4hashIjENS8_18_Mod_range_hashingENS8_20_Default_ranged_hashENS8_20_Prime_rehash_policyENS8_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev + fun:~unordered_map + fun:~Input + fun:operator() + fun:~unique_ptr + fun:_ZN3mlx4core11ApplicationD1Ev + fun:mlx_destroy_display + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: reachable + fun:realloc + fun:SDL_SetError_REAL + fun:destroy + fun:_ZN3mlx10MLX_WindowD1Ev + fun:_M_release + fun:~__shared_count + fun:~__shared_ptr + fun:~pair + fun:destroy > > + fun:destroy > > + fun:_M_deallocate_node + fun:_M_deallocate_nodes + fun:clear + fun:_ZNSt10_HashtableIjSt4pairIKjSt10shared_ptrIN3mlx10MLX_WindowEEESaIS6_ENSt8__detail10_Select1stESt8equal_toIjESt4hashIjENS8_18_Mod_range_hashingENS8_20_Default_ranged_hashENS8_20_Prime_rehash_policyENS8_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev + fun:~unordered_map + fun:~Input + fun:operator() + fun:~unique_ptr + fun:_ZN3mlx4core11ApplicationD1Ev + fun:mlx_destroy_display + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: reachable + fun:malloc + fun:UnknownInlinedFun + fun:SDL_strdup_REAL + fun:SDL_IBus_Init + fun:SDL_IME_Init.isra.0 + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev +} +{ + name + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: reachable + fun:malloc + fun:malloc + fun:strdup + fun:_dl_load_cache_lookup + fun:_dl_map_object + fun:openaux + fun:_dl_catch_exception + fun:_dl_map_object_deps + fun:dl_open_worker_begin + fun:_dl_catch_exception + fun:dl_open_worker + fun:_dl_catch_exception + fun:_dl_open +} +{ + name + Memcheck:Leak + match-leak-kinds: reachable + fun:malloc + fun:malloc + fun:_dl_new_object + fun:_dl_map_object_from_fd + fun:_dl_map_object + fun:openaux + fun:_dl_catch_exception + fun:_dl_map_object_deps + fun:dl_open_worker_begin + fun:_dl_catch_exception + fun:dl_open_worker + fun:_dl_catch_exception + fun:_dl_open +} +{ + name + Memcheck:Leak + match-leak-kinds: reachable + fun:realloc + fun:SDL_realloc_REAL + fun:UnknownInlinedFun + fun:SDL_TLSSet_REAL + fun:SDL_GetErrBuf + fun:SDL_SetError_REAL + fun:destroy + fun:_ZN3mlx10MLX_WindowD1Ev + fun:_M_release + fun:~__shared_count + fun:~__shared_ptr + fun:~pair + fun:destroy > > + fun:destroy > > + fun:_M_deallocate_node + fun:_M_deallocate_nodes + fun:clear + fun:_ZNSt10_HashtableIjSt4pairIKjSt10shared_ptrIN3mlx10MLX_WindowEEESaIS6_ENSt8__detail10_Select1stESt8equal_toIjESt4hashIjENS8_18_Mod_range_hashingENS8_20_Default_ranged_hashENS8_20_Prime_rehash_policyENS8_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev + fun:~unordered_map + fun:~Input + fun:operator() + fun:~unique_ptr + fun:_ZN3mlx4core11ApplicationD1Ev + fun:mlx_destroy_display + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: reachable + fun:malloc + fun:malloc + fun:strdup + fun:_dl_load_cache_lookup + fun:_dl_map_object + fun:dl_open_worker_begin + fun:_dl_catch_exception + fun:dl_open_worker + fun:_dl_catch_exception + fun:_dl_open + fun:dlopen_doit + fun:_dl_catch_exception + fun:_dl_catch_error +} +{ + name + Memcheck:Leak + match-leak-kinds: reachable + fun:malloc + fun:malloc + fun:_dl_new_object + fun:_dl_map_object_from_fd + fun:_dl_map_object + fun:dl_open_worker_begin + fun:_dl_catch_exception + fun:dl_open_worker + fun:_dl_catch_exception + fun:_dl_open + fun:dlopen_doit + fun:_dl_catch_exception + fun:_dl_catch_error +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard +} +{ + name + Memcheck:Leak + match-leak-kinds: definite + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:SDL_DBus_Init_Spinlocked.lto_priv.0 + fun:UnknownInlinedFun + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + fun:strdup + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:SDL_DBus_Init_Spinlocked.lto_priv.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:SDL_DBus_Init_Spinlocked.lto_priv.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:SDL_DBus_CallMethodInternal + fun:SDL_DBus_CallMethodOnConnection + fun:IBus_SetupConnection +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:SDL_DBus_CallMethodInternal + fun:SDL_DBus_CallMethod + fun:SDL_DBus_ScreensaverInhibit +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + fun:strdup + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:SDL_DBus_CallMethodInternal + fun:SDL_DBus_CallMethod + fun:SDL_DBus_ScreensaverInhibit + fun:X11_SuspendScreenSaver + fun:UnknownInlinedFun + fun:SDL_VideoInit_REAL +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:SDL_DBus_CallMethodInternal + fun:SDL_DBus_CallMethodOnConnection + fun:IBus_SetupConnection +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:SDL_DBus_CallVoidMethodInternal + fun:SDL_DBus_CallVoidMethod + fun:X11_SuspendScreenSaver + fun:UnknownInlinedFun + fun:SDL_VideoInit_REAL +} +{ + name + Memcheck:Leak + match-leak-kinds: reachable + fun:malloc + fun:malloc + fun:_dl_close_worker + fun:_dl_close + fun:_dl_catch_exception + fun:_dl_catch_error + fun:_dlerror_run + fun:dlclose@@GLIBC_2.34 + fun:UnknownInlinedFun + fun:loader_scanned_icd_clear.constprop.0 + fun:UnknownInlinedFun + fun:UnknownInlinedFun + fun:vkDestroyInstance + fun:_ZN3mlx8Instance7destroyEv + fun:_ZN3mlx11Render_Core7destroyEv + fun:mlx_destroy_display +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:SDL_DBus_Init_Spinlocked.lto_priv.0 + fun:UnknownInlinedFun + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + obj:* + obj:* + fun:SDL_DBus_Init_Spinlocked.lto_priv.0 + fun:UnknownInlinedFun + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: definite + fun:calloc + obj:* + obj:* + obj:* + obj:* + fun:SDL_DBus_Init_Spinlocked.lto_priv.0 + fun:UnknownInlinedFun + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init + fun:main +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + fun:strdup + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard +} +{ + name + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + fun:strdup + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard +} +{ + name + Memcheck:Leak + match-leak-kinds: reachable + fun:calloc + fun:calloc + fun:_dl_check_map_versions + fun:dl_open_worker_begin + fun:_dl_catch_exception + fun:dl_open_worker + fun:_dl_catch_exception + fun:_dl_open + fun:dlopen_doit + fun:_dl_catch_exception + fun:_dl_catch_error + fun:_dlerror_run + fun:dlopen_implementation + fun:dlopen@@GLIBC_2.34 +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard +} +{ + name + Memcheck:Leak + match-leak-kinds: definite + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:realloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 +} +{ + name + Memcheck:Leak + match-leak-kinds: definite + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard +} +{ + name + Memcheck:Leak + match-leak-kinds: reachable + fun:calloc + fun:calloc + fun:_dl_new_object + fun:_dl_map_object_from_fd + fun:_dl_map_object + fun:openaux + fun:_dl_catch_exception + fun:_dl_map_object_deps + fun:dl_open_worker_begin + fun:_dl_catch_exception + fun:dl_open_worker + fun:_dl_catch_exception + fun:_dl_open +} +{ + name + Memcheck:Leak + match-leak-kinds: reachable + fun:calloc + fun:calloc + fun:_dl_new_object + fun:_dl_map_object_from_fd + fun:_dl_map_object + fun:dl_open_worker_begin + fun:_dl_catch_exception + fun:dl_open_worker + fun:_dl_catch_exception + fun:_dl_open + fun:dlopen_doit + fun:_dl_catch_exception + fun:_dl_catch_error +} +{ + name + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* +} +{ + name + Memcheck:Leak + match-leak-kinds: indirect + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL +} +{ + name + Memcheck:Leak + match-leak-kinds: definite + fun:calloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:SDL_DBus_Init_Spinlocked.lto_priv.0 + fun:UnknownInlinedFun + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} +{ + name + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard +} +{ + name + Memcheck:Leak + match-leak-kinds: definite + fun:malloc + obj:* + obj:* + obj:* + obj:* + obj:* + fun:X11_InitKeyboard + fun:X11_VideoInit.lto_priv.0 + fun:SDL_VideoInit_REAL + fun:SDL_InitSubSystem_REAL.part.0 + fun:_ZN3mlx4core11ApplicationC1Ev + fun:mlx_init +} diff --git a/xmake.lua b/xmake.lua new file mode 100644 index 0000000..7048f27 --- /dev/null +++ b/xmake.lua @@ -0,0 +1,76 @@ +-------------------------------------------------------------------------------- +-- -- +-- ::: :::::::: -- +-- xmake.lua :+: :+: :+: -- +-- +:+ +:+ +:+ -- +-- By: maldavid +#+ +:+ +#+ -- +-- +#+#+#+#+#+ +#+ -- +-- Created: 2023/12/07 15:21:38 by kbz_8 #+# #+# -- +-- Updated: 2023/12/07 15:21:38 by kbz_8 ### ########.fr -- +-- -- +-------------------------------------------------------------------------------- + +-- Global settings + +add_requires("libsdl", "vulkan-headers") + +add_rules("mode.debug", "mode.release") +set_languages("cxx17", "c99") + +set_objectdir("objs/xmake/$(os)_$(arch)") +set_targetdir("./") + +set_optimize("fastest") + +-- Options + +option("images_optimized") + set_default(true) + add_defines("IMAGE_OPTIMIZED") +option_end() + +option("force_integrated_gpu") + set_default(false) + add_defines("FORCE_INTEGRATED_GPU") +option_end() + +option("graphics_memory_dump") + set_default(false) + add_defines("GRAPHICS_MEMORY_DUMP") +option_end() + +-- Targets + +target("mlx") + set_default(true) + set_license("MIT") + set_kind("shared") + add_options("images_optimized") + add_options("force_integrated_gpu") + add_options("graphics_memory_dump") + add_includedirs("includes", "src", "third_party") + + add_defines("MLX_BUILD") + + add_files("src/**.cpp") + + add_packages("libsdl", "vulkan-headers") + + if is_mode("debug") then + add_defines("DEBUG") + end +target_end() -- optional but I think the code is cleaner with this -- optional but I think the code is cleaner with this + +target("Test") + set_default(false) + set_kind("binary") + set_targetdir("test") + + add_linkdirs("./") + + add_deps("mlx") + + add_files("test/main.c") + + add_packages("libsdl") +target_end()