/lida_gfx

Small library for using Vulkan without pain (hopefully)

Primary LanguageC

lida_gfx

Small Vulkan abstraction library

I wrote this library for my own needs. It tries to make writing Vulkan code not so hard by removing redundant concepts like descriptor pools, descriptor set layouts, pipeline layouts, framebuffers etc.

It does so by hiding gruesome Vulkan API code and by using LRU caches to store necessary objects. This library is very lightweight: it’s only 2 files, it doesn’t have any dependencies except vulkan/vulkan.h and it does NO allocations.

Samples

Check out the samples directory. There are some examples on how to use this library.

Triangle

Hello world!

./images/triangle.png

Cube

  • 2 render passes
  • vertices are loaded to a vertex buffer
  • depth buffer

./images/cube.png

Teapots

  • mesh is loaded into a vertex buffer
  • 2 render passes, one with depth buffer
  • a compute pass to do bloom

./images/teapots.png

Equalizer

  • does a Fourier transform of incoming music
  • the job is entirely done on GPU
  • image below shows result of this sample on Lady Gaga’s “Monster” song

./images/equalizer_lady_gaga_monster.png