Skip to content

corporateshark/lightweightvk

 
 

Repository files navigation

LightweightVK Build Status

LightweightVK is a deeply refactored fork of IGL which is designed to run on top of Vulkan 1.3.

The main goals of LightweightVK:

  1. Lean. Minimalistic API without bloat (no std::vector, std::unordered_map etc in the API).
  2. Bindless. Utilize Vulkan 1.3+ dynamic rendering, descriptor indexing, and buffer device address features for modern bindless-only API design.
  3. Agile. A playground for experiments to enable quick exploration of ideas and adoption of Vulkan API changes. Designed for rapid prototyping of Vulkan-based renderers.

There are no plans to keep this fork in sync with the upstream.

Supported rendering backends

  • Vulkan 1.3 (Windows, Linux, Android)
  • Vulkan 1.2 + extensions (MacOS)

Supported platforms

  • Linux
  • Windows
  • MacOS (via MoltenVK)
  • Android

API Support

Windows Linux MacOS Android
Vulkan 1.3 ✔️ ✔️ ✔️
Vulkan 1.2 ✔️

On MacOS, features required by LightweightVK are available via extensions VK_KHR_dynamic_rendering, VK_EXT_subgroup_size_control, VK_EXT_extended_dynamic_state, VK_EXT_extended_dynamic_state2, and VK_KHR_synchronization2.

VK_KHR_maintenance4 is not yet supported in MoltenVK ❗

Check the status of Vulkan 1.3 support in MoltenVK.

Build

Before building, run the deployment scripts:

python3 deploy_content.py
python3 deploy_deps.py

These scripts download external third-party dependencies. Please check LICENSE.md for the full list.

Windows

cd build
cmake .. -G "Visual Studio 17 2022"

Linux

sudo apt-get install clang xorg-dev libxinerama-dev libxcursor-dev libgles2-mesa-dev libegl1-mesa-dev libglfw3-dev libglew-dev libstdc++-12-dev extra-cmake-modules libxkbcommon-x11-dev wayland-protocols
cd build
cmake .. -G "Unix Makefiles"

❗ Use cmake .. -G "Unix Makefiles" -DLVK_WITH_WAYLAND=ON to build for Wayland, X11 is used by default.

MacOS

❗ Be sure that VulkanSDK 1.3.275.0 for MacOS is installed https://vulkan.lunarg.com/sdk/home#mac

cd build
cmake .. -G "Xcode"

Android

❗ Be sure that Android Studio is set up.

❗ Be sure that the ANDROID_NDK environment variable points to your Android NDK.

❗ Be sure that the JAVA_HOME environment variable is set to the path of the Java Runtime.

❗ Be sure that the adb platform tool is in the PATH environment variable.

cd build
cmake .. -DLVK_WITH_SAMPLES_ANDROID=ON
cd android/Tiny                         # or any other sample
./gradlew assembleDebug                 # or assembleRelease

You can also open the project in Android Studio and build it from there.

Before running demo apps on your device, connect the device to a desktop machine and run the deployment script:

python3 deploy_content_android.py

NOTE: To run demos on an Android device, it should support Vulkan 1.3. Please check https://vulkan.gpuinfo.org/listdevices.php?platform=android

NOTE: At the moment, no touch input is supported on Android.

Screenshots

image

License

LightweightVK is released under the MIT license, see LICENSE.md for the full text as well as third-party library acknowledgements.

About

LightweightVK is a deeply refactored fork of https://github.com/facebook/igl. It provides a lean cross-platform graphics API running on top of Vulkan 1.3.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages

  • C++ 94.6%
  • CMake 4.3%
  • Other 1.1%