This guide walks you through setting up your development environment and compiling this project on Windows, macOS, and Ubuntu/Debian.
Before building or running 3DLevED, make sure your system has the required tools installed.
โ Required on All Platforms Git โ For cloning the repository
CMake (3.14 or higher) โ For project configuration
C++ Compiler
GCC, Clang, or MSYS2/MinGW depending on OS
OpenGL-Compatible GPU
1. Download and install the appropriate 64-bit version from the MSYS2 website.ย
Not
MSYS
,MinGW
, orCLANG
.
pacman -Syu
# Restart terminal if prompted
pacman -Su
pacman -S mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-make git
๐ฆ Optional: Install libraries manually Example:
pacman -S mingw-w64-x86_64-glfw mingw-w64-x86_64-glew mingw-w64-x86_64-glm mingw-w64-x86_64-imgui
If the libraries you want to install are included in FetchContent
in CMake, this is not required.
1. Install Homebrew using the install script from the Homebrew website
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
๐ก Important: Follow the post-install instructions to add Homebrew to your shell config.
Post-installation steps When you install Homebrew, it prints some directions for updating your shellโs config. If you donโt follow those directions, Homebrew will not work.
You need to update your shellโs config file (which file exactly depends on your shell, for example ~/.bashrc or ~/.zshrc) to include this Example:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
Replace with the directory where Homebrew is installed on your system. You can find Homebrewโs default install location in this FAQ entry.
brew install cmake git
sudo apt update
sudo apt install build-essential cmake git libgl1-mesa-dev libx11-dev libxi-dev libxrandr-dev libxinerama-dev libxcursor-dev
โ ๏ธ We recommend using the provided setup script to manage cloning, building, and running the project.
๐ฅ Step 1: Clone the Repository
git clone https://github.com/BurnCan/3DLevED
cd 3DLevED
๐ Step 2: Make the Script Executable and Run It
chmod +x build.sh && ./build.sh
This launches an interactive menu that helps you build, rebuild, recompile, or run the application.
If you prefer not to use the setup script, follow the appropriate manual instructions below:
git clone https://github.com/BurnCan/3DLevED
cd 3DLevED
mkdir build && cd build
๐ก To clone a specific branch (e.g., development):
git clone --branch development --single-branch https://github.com/BurnCan/3DLevED
OS-specific CMake and build commands:
๐ช Windows (MSYS2):
cmake -G "MinGW Makefiles" ..
mingw32-make -j4
๐๐ง macOS / Linux:
cmake ..
make -j4
Run the application:
๐ช/๐ง Windows / Linux:
./build/bin/3DLevED
๐macOS:
./build/bin/3DLevED.app/Contents/MacOS/3DLevED
cd build
OS-specific build commands:
๐ช Windows (MSYS2):
cmake -G "MinGW Makefiles" ..
mingw32-make -j4
๐๐ง macOS / Linux:
cmake ..
make -j4
Run the application:
๐ช/๐งWindows / Linux:
./build/bin/3DLevED
๐macOS:
./build/bin/3DLevED.app/Contents/MacOS/3DLevED
๐ Rebuild After CMake Configuration Changes
cd build
rm CMakeCache.txt
rm -rf CMakeFiles
OS-specific CMake and build commands:
๐ช Windows (MSYS2):
cmake -G "MinGW Makefiles" ..
mingw32-make -j4
๐๐ง macOS / Linux:
cmake ..
make -j4
Run the application:
๐ช/๐งWindows / Linux:
./build/bin/3DLevED
๐macOS:
./build/bin/3DLevED.app/Contents/MacOS/3DLevED
๐งนRemove the cloned project directory:
Assuming you cloned into the home directory
cd ~
then
rm -rf 3DLevED
๐งนRemove temporary copies of script:
find /tmp -type d -name "3DLevED*" -exec rm -rf {} +
find /private/var/folders -type d -name "3DLevED*" -exec rm -rf {} +
This cleans up any leftover setup script directories.
3DLevED/
โโโ shaders/
โโโ src/
โโโ CMakeLists.txt
โโโ README.md
โโโ rebuild.sh
โโโ build/
โโโ bin/
โโโ shaders/
โโโ 3DLevED.exe
The archive/
directory contains all runtime assets needed by the application, including the shaders/
subdirectory.
During a build, CMake recursively copies the contents of archive/
into the appropriate runtime location:
- macOS:
build/3DLevED.app/Contents/Resources/
- Linux/Windows:
build/bin/
This ensures that your application has access to all necessary shader files and supporting data.
To modify and maintain shader files properly, follow this workflow:
- Live shaders are loaded from:
build/bin/shaders/
(or inside the app bundle on macOS)
- When the application runs, it reads shaders from this location.
- Use the in-app Shader Utility Editor in 3DLevED:
- The Save button updates the file in
build/bin/shaders/
. - The Reload button re-reads the file from
build/bin/shaders/
.
โ Important: Always make shader edits through the in-app editor (or directly in
build/bin/shaders/
) โ changes in the originalarchive/shaders/
directory will be overwritten next time you rebuild the project.
-
To persist a modified shader file:
-
Use the Archive button in the Shader Utility.
-
This saves the updated shader file back to:
archive/shaders/
-
On the next build, this updated file will be included in the runtime copy.
Happy coding! ๐ฎ