A cross-platform (macOS, Windows, Linux, iOS, Android) application implementing native, borderless windows and a Vulkan rendering context.
- All window management (creation/resizing/etc.) is handled via native system APIs (SwiftUI (with AppKit/UIKit), win32, wayland, GameActivity) rather than a layer like GLFW or SDL
- Legitimate application windows are used, so all behaviors like snapping, tiling, etc. work as expected
- Multi-monitor HiDPI awareness is implemented on all platforms
Functionality is nearly feature-complete. The following major tasks remain:
- Handle wayland tiling/maximize hints (
stagesargument fromxdg_toplevel::configureevent) - Fullscreen mode
- Attempt to acquire exclusive fullscreen access if possible (
VK_EXT_full_screen_exclusiveextension) - Disable window border/shadow renderpass on wayland when transitioning to fullscreen
DRAW_WINDOW_BORDERconditionals- Move from subpass to genuine renderpass
- Attempt to acquire exclusive fullscreen access if possible (
Nice-to-haves:
- Get system cursor theme on wayland
- Refactor functions with long parameter lists to take structs
- Integrate dear imgui with application renderpass
- Add test suite and run via CI pipeline
- Apply this framework via a game/application beyond drawing a triangle :)
makebuilds the binary on Linux (modeler) and Windows (modeler.exe), a static library (modeler.a) on macOS and iOS, and a static library (modeler_android.a) on Android. The macOS and iOS applications can be built via the Xcode project under xcode/. The Android app can be built via the Android Studio project under android/.
To build for iOS, set environment variable IOS to true. Similarly, for Android, set ANDROID to true. E.g.
make IOS=trueTo enable debugging symbols, external SPIR-V files, and dynamic libraries, set the DEBUG environment variable
make DEBUG=trueTo enable imgui, set the ENABLE_IMGUI environment variable
make ENABLE_IMGUI=trueTo enable FIFO frame presentation, set the ENABLE_VSYNC environment variable. Otherwise mailbox is used. (This variable is misnamed and should be changed.)
make ENABLE_VSYNC=truewayland-protocols libwayland-dev libvulkan-dev glslc bsdextrautils (hexdump)
vulkan-validationlayers
Set up locations of Vulkan libraries to which to link: Xcode > Settings > Locations > Custom Paths
| Name | Display Name | Path |
|---|---|---|
| VULKAN_SDK | Vulkan SDK | <path_to_vulkan_sdk_including_version> |
| VULKAN_HEADERS | Vulkan Headers | <path_to_vulkan_sdk_including_version>/macOS/include |
| VULKAN_IOS_HEADERS | Vulkan iOS Headers | <path_to_vulkan_sdk_including_version>/iOS/include |
| VULKAN_LIB | Vulkan Libraries | <path_to_vulkan_sdk_including_version>/macOS/lib |
Install mingw_w64 (preferrably via msys64).
Install Vulkan SDK. Paths in Makefile may need to be updated for install location and version.
| Name | License | Website | Notes |
|---|---|---|---|
| Dear ImGui | MIT | GitHub | |
| lodepng | zlib | GitHub | |
| MoltenVK | Apache-2.0 | GitHub | macOS and iOS only |
| tinyobjloader | MIT | GitHub | |
| VMA | MIT | GitHub | |
| Vulkan Loader | Apache-2.0 | GitHub | Dynamic linking on some platforms |


