Skip to content

🔥 A simple c++20 Vulkan framework, for fun & exploration.

License

Notifications You must be signed in to change notification settings

tcoppex/vk-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

language: c++20 api: vulkan1.1 License: MIT

🔥 vk-playground 🔥

A simple c++20 / Vulkan 1.1 rendering framework, flavored like 1.4, inspired by WebGPU and vk_minimal_latest.

Runs on GNU/Linux and Windows 11, compiled with GCC 11.4 and MSVC 19.38.

Quick start & run !
# [Optional] Retrieve system build dependencies with Synaptic.
# sudo apt install git git-lfs build-essential cmake vulkan-sdk

# Clone the repository.
git clone https://github.com/tcoppex/vk-playground
cd vk-playground

# Build.
cmake . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release

# Run the first demo.
./bin/00_hello

Demos

  • 00_hello: Display a surface and clear its color (Device, Swapchain, dynamic rendering).
  • 01_triangle: Display a simple triangle (Shader, Graphics Pipeline, Vertex Buffer, Commands).
  • 02_push_constant: Update per-frame values via push constants and dynamic states (Push Constant).
  • 03_descriptor_set: Initialize & update a descriptor set on a single uniform buffer (Descriptor Set).
  • 04_texturing: Display a textured cube with a linear sampler (Image, Sampler).
  • 05_stencil_op: Stencil operations and instancing through a multi-passes portal effect (Stencil, instancing).
  • 06_blend_op: Fast & simple billboarded GPU particles with additive blend operation (Blending).
  • 07_compute: Waves simulation with sorted alpha-blended particles via compute shaders (Compute Pipeline, Barrier).

Dependencies

Third parties
  • Vulkan SDK 1.1
  • CMake 3.31
  • CPM 0.40.3 (downloaded automatically)
  • GLFW 3.4 (via CPM)
  • Volk 1.4 (via CPM)
  • VulkanMemoryAllocator 3.2.0 (via CPM)
  • linalg v2.2 (via CPM)
  • stb_image.h (included)
Vulkan device extensions

License

vk-playground is released under the MIT license.

About

🔥 A simple c++20 Vulkan framework, for fun & exploration.

Topics

Resources

License

Stars

Watchers

Forks