2023-11-25 10:44:24 +01:00
2023-11-10 09:21:58 +01:00
2023-11-23 14:37:42 +01:00
2023-11-25 10:43:05 +01:00
2023-11-25 10:43:05 +01:00
2023-11-25 10:43:05 +01:00
2023-11-24 19:34:15 +01:00
2023-11-24 19:34:15 +01:00
2023-11-21 07:13:15 +01:00
2023-11-24 19:34:15 +01:00
2023-11-25 10:44:24 +01:00

MacroLibX linux clang workflow linux gcc workflow macos workflow

A rewrite of 42 School's MiniLibX using SDL2 and Vulkan.

The goal of this version is to provide a light, fast, and modern graphical tool while keeping the same API.

drawing

🖥️ Installation

Dependencies

You first need to install the proper dependencies for your operating-system.

🐧 Linux

Here are a few common cases for different Linux distributions:

For Ubuntu/Debian-based distros:
sudo apt update
sudo apt install libsdl2-2.0-0 libsdl2-dev build-essential
For ArchLinux-based distros:
sudo pacman -S sdl2

🍎 macOS

MacroLibX on macOS requires SDL2 and MoltenVK. You can install both using the Homebrew package manager:

brew install molten-vk
brew install SDL2

Clone and Build

Finally, you can clone the Git repository. When inside it, run the GNU make command to compile MacroLibX.

git clone https://github.com/420verfl0w/MacroLibX.git
cd MacroLibX
make

If you want to build using GCC you can add TOOLCHAIN=gcc to your make command

make TOOLCHAIN=gcc

🔨 Compile your project

To compile your project with MacroLibX, you just provide the shared library path in your compilation/linking command:

clang myApp.c /path/to/MacroLibX/libmlx.so -lSDL2

⚠️ Troubleshooting

If you run into glitches when writing or reading pixels from images

You need to add IMAGES_OPTIMIZED=false to your make command:

# In your cloned environment, inside the MacroLibX folder
make IMAGES_OPTIMIZED=false

License

This project and all its files, except the third_party directory or unless otherwise mentionned, are licenced under the MIT license.

Description
Rewritten version of the minilibx graphics API used at 42school, using SDL2 & Vulkan.
https://macrolibx.kbz8.me/ Readme MIT 23 MiB
Languages
C++ 94.1%
C 4.6%
Makefile 0.5%
Meson 0.4%
Shell 0.2%
Other 0.2%