Skip to content

2.0.0

Latest

Choose a tag to compare

@ThibaultTricard ThibaultTricard released this 04 Feb 13:27

LavaCake 2.0.0

LavaCake 2.0 is a complete rewrite of the library. The entire API surface is new — nothing from 1.x carries over directly.

Core architecture

  • Header-only. Drop in via CMake find_package or FetchContent, no separate compilation step.
  • Built on vulkan.hpp. All handles and enums are the vulkan.hpp types; raw Vk* handles are not exposed.
  • Vulkan 1.3 dynamic rendering is mandatory — there are no render passes anywhere in the API.
  • VMA is the sole allocator for buffers and images. A thin flag wrapper is provided for allocation tuning.

Device creation

  • Four factory functions cover the common cases: createBasicDevice, createWindowedDevice, createAdvancedDevice, createHeadlessDevice.
  • A fluent Device::Builder is available for full control: queue counts, validation layers, instance/device extensions, 46 individual Vulkan 1.0 feature toggles, and a generic addFeature<T>() for any feature struct in the chain.

Window-manager agnostic

  • Surface creation is driven by a SurfaceConfig struct containing an extension list and a createSurface callback. The library has no direct dependency on any windowing library.
  • Drop-in helpers are provided for GLFW (GLFWSupport.hpp) and SDL2 (SDL2Support.hpp). Both automatically populate the preferred extent for Wayland compatibility.

Swapchain resizing

  • Device::resizeSwapchain() destroys and recreates the swapchain in one call, passing the old swapchain to the driver for reuse.
  • Accepts an optional vk::Extent2D for platforms (Wayland) where currentExtent is UINT32_MAX. Falls back to the extent captured at device creation time if none is supplied.

Pipelines and shaders

  • Runtime GLSL-to-SPIR-V compilation via shaderc. Pre-compiled SPIR-V byte code is also accepted.
  • GraphicsPipeline::Builder and ComputePipeline::Builder cover the full pipeline state with a fluent API.
  • Bindless rendering is fully supported: descriptor indexing is enabled by default in the factory functions.

Descriptors

  • DescriptorSetLayout::Builder, DescriptorPool, and DescriptorSetUpdater provide type-safe descriptor management without raw Vulkan calls.

ImGui

  • ImGuiRenderer renders ImGui draw lists directly into any image view. Vertex and fragment shaders are embedded as SPIR-V.

Examples — 13 total

  • Basic: clear screen, colored triangle (with resize handling), uniform buffer, vertex buffer, indexed quad, three bindless variants, rotating cube.
  • Advanced: shadow mapping, multiple lights with bindless shadow arrays.
  • Compute: headless vector addition.
  • ImGui: full demo overlay.

Build and install

  • CMake 3.13+, C++20.
  • cmake --install produces a relocatable package with headers, shaderc, and CMake config files. macOS, Linux, and Windows (untested) are supported.