# saschawillems/vulkan architecture

> Architecture diagram of the GitHub repository saschawillems/vulkan, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/saschawillems/vulkan
- Repository: https://github.com/saschawillems/vulkan

## Overview

This repository is a collection of C++ Vulkan graphics and compute examples, backed by a reusable runtime framework and platform entry points. The main workflow is to launch a sample, initialize Vulkan and its presentation target, run a rendering or compute demonstration, and show the result. The README documents broad sample families; the supplied tree does not include the examples directory, so those capabilities are represented through the existing Apple example selector. Runtime links are limited to relationships supported by the sampled source or README; most implementation wiring was not sampled.

Main entry points: [`base/vulkanexamplebase.cpp`](https://github.com/saschawillems/vulkan/blob/master/base/vulkanexamplebase.cpp) (Example framework), [`apple/ios/DemoViewController.h`](https://github.com/saschawillems/vulkan/blob/master/apple/ios/DemoViewController.h) (Platform apps), [`apple/examples.h`](https://github.com/saschawillems/vulkan/blob/master/apple/examples.h) (Example selector), [`base/Entrypoints.h`](https://github.com/saschawillems/vulkan/blob/master/base/Entrypoints.h) (Runtime entry points)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_platform["Platform entry points"]
  node_platform_apps["Platform apps"]
  node_example_select["Example selector<br/>[examples.h]"]
end

subgraph group_runtime["Vulkan runtime"]
  node_entrypoints["Runtime entry points<br/>[Entrypoints.h]"]
  node_framework["Example framework"]
  node_device["Vulkan device<br/>[VulkanDevice.cpp]"]
  node_swapchain["Presentation"]
  node_debug["Validation tools<br/>[VulkanDebug.cpp]"]
  node_commandline["Launch options"]
end

subgraph group_demos["Example capabilities"]
  node_basic["Basic graphics<br/>[examples.h]"]
  node_rendering["Advanced rendering<br/>[examples.h]"]
  node_compute["Compute shaders<br/>[examples.h]"]
  node_raytracing["Ray tracing<br/>[examples.h]"]
  node_assets_demos["glTF and PBR<br/>[examples.h]"]
end

subgraph group_assets["Rendering resources"]
  node_resources["Buffers and textures<br/>[VulkanBuffer.cpp]"]
  node_gltf["glTF assets"]
  node_overlay["UI overlay"]
end

node_user(("Example user"))
node_external_vulkan["Vulkan API"]

node_user -->|"launches"| node_platform_apps
node_platform_apps -->|"selects sample"| node_example_select
node_example_select -->|"starts runtime"| node_entrypoints
node_user -->|"sets options"| node_commandline
node_entrypoints -->|"enters"| node_framework
node_framework -->|"initializes"| node_device
node_framework -->|"presents through"| node_swapchain
node_framework -->|"configures"| node_debug
node_framework -->|"hosts"| node_basic
node_framework -->|"hosts"| node_rendering
node_framework -->|"hosts"| node_compute
node_framework -->|"hosts"| node_raytracing
node_framework -->|"hosts"| node_assets_demos
node_basic -->|"uses"| node_resources
node_rendering -->|"uses"| node_resources
node_assets_demos -->|"loads models"| node_gltf
node_framework -->|"provides UI"| node_overlay
node_device -->|"calls"| node_external_vulkan
node_swapchain -->|"calls"| node_external_vulkan

click node_platform_apps "https://github.com/saschawillems/vulkan/blob/master/apple/ios/DemoViewController.h"
click node_example_select "https://github.com/saschawillems/vulkan/blob/master/apple/examples.h"
click node_entrypoints "https://github.com/saschawillems/vulkan/blob/master/base/Entrypoints.h"
click node_framework "https://github.com/saschawillems/vulkan/blob/master/base/vulkanexamplebase.cpp"
click node_device "https://github.com/saschawillems/vulkan/blob/master/base/VulkanDevice.cpp"
click node_swapchain "https://github.com/saschawillems/vulkan/blob/master/base/VulkanSwapChain.cpp"
click node_debug "https://github.com/saschawillems/vulkan/blob/master/base/VulkanDebug.cpp"
click node_commandline "https://github.com/saschawillems/vulkan/blob/master/base/CommandLineParser.hpp"
click node_resources "https://github.com/saschawillems/vulkan/blob/master/base/VulkanBuffer.cpp"
click node_gltf "https://github.com/saschawillems/vulkan/blob/master/base/VulkanglTFModel.cpp"
click node_overlay "https://github.com/saschawillems/vulkan/blob/master/base/VulkanUIOverlay.cpp"
click node_basic "https://github.com/saschawillems/vulkan/blob/master/apple/examples.h"
click node_rendering "https://github.com/saschawillems/vulkan/blob/master/apple/examples.h"
click node_compute "https://github.com/saschawillems/vulkan/blob/master/apple/examples.h"
click node_raytracing "https://github.com/saschawillems/vulkan/blob/master/apple/examples.h"
click node_assets_demos "https://github.com/saschawillems/vulkan/blob/master/apple/examples.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_platform_apps,node_example_select,node_user toneBlue
class node_entrypoints,node_framework,node_device,node_swapchain,node_debug,node_commandline toneAmber
class node_basic,node_rendering,node_compute,node_raytracing,node_assets_demos,node_external_vulkan toneMint
class node_resources,node_gltf,node_overlay toneRose
```

## Components

### Platform entry points

- [Platform apps](https://github.com/saschawillems/vulkan/blob/master/apple/ios/DemoViewController.h): `apple/ios/DemoViewController.h`
- [Example selector](https://github.com/saschawillems/vulkan/blob/master/apple/examples.h): `apple/examples.h`

### Vulkan runtime

- [Runtime entry points](https://github.com/saschawillems/vulkan/blob/master/base/Entrypoints.h): `base/Entrypoints.h`
- [Example framework](https://github.com/saschawillems/vulkan/blob/master/base/vulkanexamplebase.cpp): `base/vulkanexamplebase.cpp`
- [Vulkan device](https://github.com/saschawillems/vulkan/blob/master/base/VulkanDevice.cpp): `base/VulkanDevice.cpp`
- [Presentation](https://github.com/saschawillems/vulkan/blob/master/base/VulkanSwapChain.cpp): `base/VulkanSwapChain.cpp`
- [Validation tools](https://github.com/saschawillems/vulkan/blob/master/base/VulkanDebug.cpp): `base/VulkanDebug.cpp`
- [Launch options](https://github.com/saschawillems/vulkan/blob/master/base/CommandLineParser.hpp): `base/CommandLineParser.hpp`

### Example capabilities

- [Basic graphics](https://github.com/saschawillems/vulkan/blob/master/apple/examples.h): `apple/examples.h`
- [Advanced rendering](https://github.com/saschawillems/vulkan/blob/master/apple/examples.h): `apple/examples.h`
- [Compute shaders](https://github.com/saschawillems/vulkan/blob/master/apple/examples.h): `apple/examples.h`
- [Ray tracing](https://github.com/saschawillems/vulkan/blob/master/apple/examples.h): `apple/examples.h`
- [glTF and PBR](https://github.com/saschawillems/vulkan/blob/master/apple/examples.h): `apple/examples.h`

### Rendering resources

- [Buffers and textures](https://github.com/saschawillems/vulkan/blob/master/base/VulkanBuffer.cpp): `base/VulkanBuffer.cpp`
- [glTF assets](https://github.com/saschawillems/vulkan/blob/master/base/VulkanglTFModel.cpp): `base/VulkanglTFModel.cpp`
- [UI overlay](https://github.com/saschawillems/vulkan/blob/master/base/VulkanUIOverlay.cpp): `base/VulkanUIOverlay.cpp`

### Other components

- **Example user**
- **Vulkan API**

## Connections

- Example user → Platform apps: launches
- Platform apps → Example selector: selects sample
- Example selector → Runtime entry points: starts runtime
- Example user → Launch options: sets options
- Runtime entry points → Example framework: enters
- Example framework → Vulkan device: initializes
- Example framework → Presentation: presents through
- Example framework → Validation tools: configures
- Example framework → Basic graphics: hosts
- Example framework → Advanced rendering: hosts
- Example framework → Compute shaders: hosts
- Example framework → Ray tracing: hosts
- Example framework → glTF and PBR: hosts
- Basic graphics → Buffers and textures: uses
- Advanced rendering → Buffers and textures: uses
- glTF and PBR → glTF assets: loads models
- Example framework → UI overlay: provides UI
- Vulkan device → Vulkan API: calls
- Presentation → Vulkan API: calls
