All Projects → hexops → mach-glfw-vulkan-example

hexops / mach-glfw-vulkan-example

Licence: Unknown and 2 other licenses found Licenses found Unknown LICENSE Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT
mach-glfw Vulkan example

Programming Languages

Zig
133 projects
GLSL
2045 projects

mach/glfw Vulkan example Hexops logo

This is an example for how to use mach-glfw and vulkan-zig together to create a basic Vulkan window.

This is nearly a 1:1 copy of the vulkan-zig example by @snektron, the only difference is using mach-glfw.

image

Getting started

Install the Vulkan SDK

You must install the LunarG Vulkan SDK: https://vulkan.lunarg.com/sdk/home

Clone the repository and dependencies

git clone --recurse-submodules https://github.com/hexops/mach-glfw-vulkan-example

Ensure glslc is on your PATH

On MacOS, you may e.g. place the following in your ~/.zprofile file:

export PATH=$PATH:$HOME/VulkanSDK/1.2.189.0/macOS/bin/

Run the example

zig build run

Cross compilation

At this time, cross compilation is not possible due to the Vulkan SDK requirement. We're working on this.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].