Find a file
alexei-zebra 68d4214627
Fix the engine window frame on windows
Four things came out of testing on windows.

The window settings were hidden outside of wayland because the check used
the backend name, while the bar height matters wherever the engine draws
the frame. The window now reports that (hasEngineFrame: barEnabled on
wayland, engineFrame on glfw) and the display page asks for it. Only the
live resize switch stays wayland specific, since the glfw backend always
draws a fresh frame.

The simplified mode is gone: when the frame is active and the surface has
alpha, the shadow and the outer resize border are always there.

The bar and its controls are drawn even when the font is missing: the early
return used to make the whole bar invisible while its hit zones kept
working.

GLFW rewrites the window style on every mode change and dropped the thick
frame the native resize border and snapping need, so the frame is set up
again after such a change.

Windows runs a modal loop while a window border is dragged and the main
loop is blocked inside it, which froze the content during a resize. The
backend draws and presents a frame from the refresh callback now, and
skips the framerate limit there.
2026-10-10 22:02:33 +03:00
.github Drop the manual trigger from the Windows workflow 2026-10-10 12:23:42 +03:00
dev complete the rename of voxelengine to voxelcore 2026-10-10 10:54:36 +03:00
doc complete the rename of voxelengine to voxelcore 2026-10-10 10:54:36 +03:00
res Fix the engine window frame on windows 2026-10-10 22:02:33 +03:00
src Fix the engine window frame on windows 2026-10-10 22:02:33 +03:00
test complete the rename of voxelengine to voxelcore 2026-10-10 10:54:36 +03:00
vctest add '--debugger' argument to vctest 2026-09-14 22:16:18 +03:00
.clang-format format: fix: set AllowShortFunctionsOnASingleLine to 'None' 2024-08-03 19:39:58 +03:00
.cmake-format.py add cmake-format.py and formating all cmake files 2025-01-09 16:32:54 +03:00
.gitignore update .gitignore 2026-08-09 18:17:22 +03:00
CHANGELOG.md update CHANGELOG.md 2026-10-03 02:29:40 +03:00
CMakeLists.txt complete the rename of voxelengine to voxelcore 2026-10-10 10:54:36 +03:00
CMakePresets.json Improve Windows presets 2026-09-29 01:20:54 +03:00
compile_flags.txt add compile_flags.txt with -Isrc for ide with clangd 2024-10-19 21:02:21 +03:00
Dockerfile complete the rename of voxelengine to voxelcore 2026-10-10 10:54:36 +03:00
flake.lock Flake update 2024-08-05 23:29:13 +03:00
flake.nix complete the rename of voxelengine to voxelcore 2026-10-10 10:54:36 +03:00
LICENSE add Mozilla Public License Version 2.0 2026-09-25 17:14:23 +03:00
README.md fix names 2026-10-10 12:34:52 +03:00
run.sh complete the rename of voxelengine to voxelcore 2026-10-10 10:54:36 +03:00
vcpkg.json add crypto library 2026-08-22 15:22:55 +07:00

voxel-core VoxelCore

Latest release


Build project in Linux

Install libraries

Install EnTT

Installing last version that supports C++17.

git clone --branch v3.16.0 https://github.com/skypjack/entt.git
cd entt
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DENTT_INSTALL=ON ..
sudo make install

ALT Linux based distros

su -
apt-get install libglfw3-devel libGLEW-devel libglm-devel libpng-devel libvorbis-devel libopenal-devel libluajit-devel libstdc++13-devel-static libcurl-devel libfreetype-devel libssl-devel

Debian based distros

sudo apt install libglfw3 libglfw3-dev libglew-dev libglm-dev libpng-dev libopenal-dev libluajit-5.1-dev libvorbis-dev libcurl4-openssl-dev libssl-dev libfreetype6-dev

Tip

CMake missing LUA_INCLUDE_DIR and LUA_LIBRARIES fix:

sudo ln -s /usr/lib/x86_64-linux-gnu/libluajit-5.1.a /usr/lib/x86_64-linux-gnu/liblua5.1.a
sudo ln -s /usr/include/luajit-2.1 /usr/include/lua

RHEL based distros

sudo dnf install glfw-devel glew-devel glm-devel libpng-devel libvorbis-devel openal-soft-devel luajit-devel libcurl-devel libfreetype-devel openssl-devel

Arch based distros

sudo pacman -S glfw glew glm libpng libvorbis openal luajit curl freetype2 openssl

Wayland

On Linux the engine draws the window frame itself and needs wayland-client, wayland-egl, wayland-scanner, wayland-protocols, libxkbcommon and EGL. Build with -DVOXELCORE_WAYLAND=OFF to fall back to GLFW.

Building engine with CMake

git clone --recursive https://github.com/MihailRis/VoxelCore.git
cd VoxelCore
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --parallel

Tip

Use --parallel to utilize all CPU cores during build.


Building project in macOS

Install libraries

brew install glfw3 glew glm libpng libvorbis lua luajit libcurl openal-soft skypjack/entt/entt freetype

Tip

If Homebrew fails to install lua, luajit, or openal-soft, download, compile, and install them manually.

Building engine with CMake

git clone --recursive https://github.com/MihailRis/VoxelCore.git
cd VoxelCore
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --parallel

Building in Windows

Note

Requirements: vcpkg, CMake, Git, and Visual Studio (with C++ tools).

There are two options to use vcpkg:

  1. If you have Visual Studio installed, the VCPKG_ROOT environment variable is often already set in the Developer Command Prompt for VS.
  2. Otherwise, install vcpkg manually:
cd C:\
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat

Then set the VCPKG_ROOT environment variable and add it to PATH:

$env:VCPKG_ROOT = "C:\vcpkg"
$env:PATH = "$env:VCPKG_ROOT;$env:PATH"

Tip

For troubleshooting, refer to the official vcpkg documentation.

After installing vcpkg, build the project:

git clone --recursive https://github.com/MihailRis/VoxelCore.git
cd VoxelCore
cmake --preset default-vs-msvc-windows
cmake --build --preset default-vs-msvc-windows

Note

Make sure your CMakeUserPresets.json (if used) contains the correct VCPKG_ROOT path.


Building with CLion (MinGW / Ninja)

Note

Requirements: vcpkg, Git, and CLion (bundled with CMake, Ninja and MinGW toolchain).

Warning

Avoid installing tools in paths with spaces (e.g. Program Files). This may break MinGW builds (especially windres).

Install vcpkg manually as described in the Visual Studio section.

Configure CLion

Open the project in CLion and configure CMake profile:

Settings → Build, Execution, Deployment → CMake

Reload CMake project and build the engine.


Build using Docker

Note

First, install Docker Engine: https://docs.docker.com/engine/install

On Linux

Step 1. Build Docker image

docker build -t voxel-engine .

Step 2. Build project inside container

docker run --rm -it -v "$(pwd):/project" voxel-engine bash -c "cmake -DCMAKE_BUILD_TYPE=Release -Bbuild && cmake --build build --parallel"

Step 3. Run the application (requires X11 forwarding)

docker run --rm -it \
  -v "$(pwd):/project" \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  -v "$XAUTHORITY:/home/user/.Xauthority:ro" \
  -e DISPLAY="$DISPLAY" \
  --network=host \
  voxel-engine ./build/VoxelCore

On Windows

Note

You need an X server like VcXsrv to display the GUI.

Step 1. Install and run VcXsrv

Launch with:

.\vcxsrv.exe :0 -multiwindow -ac

Step 2. Build Docker image

docker build -t voxel-engine .

Step 3. Build project

docker run --rm -it -v "${PWD}:/project" voxel-engine bash -c "cmake -DCMAKE_BUILD_TYPE=Release -Bbuild && cmake --build build --parallel"

Step 4. Run the application

docker run --rm -it -v "${PWD}:/project" -e DISPLAY=host.docker.internal:0.0 --network=host voxel-engine ./build/VoxelCore