Skip to content

LukyGuyLucky/Vulkan.c3

 
 

Repository files navigation

Vulkan.c3

Vulkan bindings for C3 language

Currently at very early stage, binding api could change.

Features

  • Vulkan API 1.0 - 1.3 bindings
  • C3 error handling for Vulkan commands
  • Auto-generated build pattern for Vulkan struct creation

Running examples

Install C3 from https://c3-lang.org/

Download VulkanSDK from https://vulkan.lunarg.com/sdk/home

Make sure enviorment variables are set correctly, depending on the installed location.

Then run c3c run cube or c3c run gltf inside the cloned repository

Example enviorment variables on MacOS and MoltenVk

export VULKAN_SDK="$HOME/VulkanSDK/1.3.261.0/macOS"
export DYLD_LIBRARY_PATH="$VULKAN_SDK/lib:${DYLD_LIBRARY_PATH:-}"
export VK_ADD_LAYER_PATH="$VULKAN_SDK/share/vulkan/explicit_layer.d"
export VK_ICD_FILENAMES="$VULKAN_SDK/share/vulkan/icd.d/MoltenVK_icd.json" 
export VK_DRIVER_FILES="$VULKAN_SDK/share/vulkan/icd.d/MoltenVK_icd.json"

Roadmap

  • Get windows example working
  • Build vulkan xml parser in C3 instead of Dart

Building bindings

Install Dart https://dart.dev/get-dart

run sh build.sh

About

Vulkan bindings for C3 language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 99.2%
  • Shell 0.8%