Skip to content

About

Work-in-progress 3D engine on Vulkan with multithreaded rendering and Bullet physics

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

47 Commits

Folders and files

Repository files navigation

🌋 VulkanEngine

A work-in-progress 3D game engine built on Vulkan — multithreaded rendering, Bullet physics and a clean application framework.

C++ Vulkan GLFW Bullet Dear ImGui vcpkg Platform Status

⚠️ Work in progress. This is an experimental engine playground — APIs and structure change constantly, and many features are incomplete.

The repository is split into a reusable engine framework (engine/) and a small demo game (src/, include/) that drops a physics-driven cube onto a plane with a free-look camera.

✨ Features

  • 🧵 Multithreaded frame loop — a dedicated render thread synchronized with the main (update) thread via binary semaphores, with MAX_FRAMES_IN_FLIGHT = 2
  • 📊 Built-in profiler overlay — FPS, CPU/GPU thread times and wait times plotted live with ImGui
  • 🗄️ Vulkan abstractions — device selection, swapchain, render passes, graphics pipelines & pipeline layouts, command buffers, shaders, images and debug utils wrapped in small RAII-style classes
  • 💾 VMA-backed buffers — uniform buffers and push-constant buffers built on Vulkan Memory Allocator
  • 🧱 Bullet physics integration — GameWorld manages game objects with rigid bodies and collision shapes
  • 📦 OBJ mesh loading — models loaded via OBJ_Loader and indexed 16-bit meshes
  • 💡 Blinn-Phong lit pipeline — ambient + diffuse + specular shading in GLSL, compiled to SPIR-V
  • 🎥 FPS-style camera — raw mouse input, cursor locking, WASD fly movement
  • 🧩 Application framework — derive from Engine::Application, override createWindow / loadAssets / init / update / render / gui and call Engine::Engine::run(game)

🎮 Controls (demo)

Input Action
W A S D Fly camera
Mouse Look around
Esc Toggle cursor lock

🛠️ Tech stack

Dependency Purpose
Vulkan + Vulkan-Headers Graphics API
VulkanMemoryAllocator GPU memory management
GLFW Windowing & input
glm Math
Bullet3 Physics
Dear ImGui (Vulkan & GLFW bindings) Debug UI
meshoptimizer Mesh optimization
plog Logging
stb, zlib, aklomp/base64 Images, compression, encoding

All dependencies are managed through the vcpkg manifest (vcpkg.json).

🔨 Building

Requirements: CMake ≥ 3.25, a C++20 compiler (MSVC) and vcpkg. The Vulkan loader and headers come from vcpkg, so the Vulkan SDK is only needed for glslc (shader compilation) and for the validation layers used by Debug builds.

git clone https://github.com/kewldan/VulkanEngine.git
cd VulkanEngine

cmake -B build -S . -DCMAKE_BUILD_TYPE=Release `
      -DCMAKE_TOOLCHAIN_FILE=<path-to-vcpkg>/scripts/buildsystems/vcpkg.cmake `
      -DVCPKG_TARGET_TRIPLET=x64-windows-static
cmake --build build --config Release

Compiling shaders

GLSL sources in shaders/ must be compiled to SPIR-V (data/shaders/*.spv) with glslc from the Vulkan SDK:

.\shader_compilation.bat

The script uses %VULKAN_SDK%\Bin\glslc.exe when VULKAN_SDK is set, otherwise glslc from PATH. Run the executable from the repository root so it can find the data/ folder.

About

Work-in-progress 3D engine on Vulkan with multithreaded rendering and Bullet physics

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages