# carcodee/codevkengine architecture

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

- Interactive diagram: https://gitdiagram.com/carcodee/codevkengine
- Repository: https://github.com/carcodee/codevkengine
- Video tour (about a minute): https://gitdiagram.com/carcodee/codevkengine/video

## Overview

CodeVkEngine is a Vulkan graphics engine for rendering experiments. The principal workflow is: a user interacts with a window and renderer controls; renderer passes describe work in the render graph; the engine manages GPU resources, builds queue batches, and submits them for presentation. The documented default is Flat_Renderer, with Cluster_Renderer and Gaussian-splat prototypes as additional capabilities. README documentation supports several relationships; source excerpts are limited, so unsampled implementation details are not inferred.

Main entry points: [`src/main.cpp`](https://github.com/carcodee/codevkengine/blob/main/src/main.cpp) (Runtime setup), [`src/Engine/RenderGraph.hpp`](https://github.com/carcodee/codevkengine/blob/main/src/Engine/RenderGraph.hpp) (Render graph), [`src/Rendering/Renderers/FlatRenderer.hpp`](https://github.com/carcodee/codevkengine/blob/main/src/Rendering/Renderers/FlatRenderer.hpp) (Flat renderer), [`src/Engine/PresentQueue.hpp`](https://github.com/carcodee/codevkengine/blob/main/src/Engine/PresentQueue.hpp) (Queue submission)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_window["Window provider<br/>[WindowProvider.hpp]"]
  node_main["Runtime setup<br/>[main.cpp]"]
end

subgraph group_render["Rendering"]
  node_flat["Flat renderer<br/>[FlatRenderer.hpp]"]
  node_cluster["Cluster renderer"]
  node_base["Renderer interface<br/>[BaseRenderer.hpp]"]
  node_renderresources["Rendering resources"]
end

subgraph group_engine["Vulkan engine"]
  node_graph["Render graph<br/>[RenderGraph.hpp]"]
  node_core["Vulkan core<br/>[Core.hpp]"]
  node_coreimpl["Core implementation<br/>[CoreImpl.hpp]"]
  node_resources["GPU resources"]
  node_descriptors["Descriptor cache"]
  node_pipeline["Pipeline creation<br/>[Pipeline.hpp]"]
  node_shader["Shader parsing<br/>[ShaderParser.hpp]"]
  node_sync["Synchronization"]
  node_present["Queue submission<br/>[PresentQueue.hpp]"]
end

subgraph group_tools["Assets and tools"]
  node_imgui["ImGui renderer<br/>[ImguiRenderer.hpp]"]
  node_files["Asset access<br/>[FilesManager.hpp]"]
  node_profiler["Profiler UI<br/>[Profiler.hpp]"]
  node_nodeui["Graph editor UI"]
end

node_user(("User"))
node_gpu(("Vulkan device"))
node_cuda["CUDA interop"]

node_user -->|"interacts with"| node_window
node_window -.->|"provides window"| node_main
node_main -->|"creates manager"| node_graph
node_main -->|"creates queue"| node_present
node_main -->|"gets manager"| node_resources
node_main -->|"gets manager"| node_renderresources
node_main -->|"selects default"| node_flat
node_user -->|"paints canvas"| node_flat
node_main -->|"selects optionally"| node_cluster
node_flat -->|"defines passes"| node_graph
node_cluster -->|"defines passes"| node_graph
node_base -.->|"interfaces"| node_flat
node_base -.->|"interfaces"| node_cluster
node_graph -->|"builds batches"| node_present
node_present -->|"submits work"| node_gpu
node_resources -.->|"manages resources"| node_gpu
node_pipeline -.->|"creates pipelines"| node_gpu
node_shader -.->|"reflects shaders"| node_pipeline
node_descriptors -.->|"binds resources"| node_pipeline
node_sync -.->|"synchronizes queues"| node_present
node_graph -->|"dispatches CUDA batches"| node_cuda
node_cuda -->|"shares exported buffers"| node_gpu
node_files -.->|"loads assets"| node_flat
node_main -->|"creates UI"| node_imgui
node_imgui -->|"inspects execution"| node_graph
node_profiler -.->|"renders profiling"| node_imgui
node_nodeui -.->|"edits graph"| node_graph
node_renderresources -.->|"supplies render assets"| node_flat

click node_window "https://github.com/carcodee/codevkengine/blob/main/src/WindowAPI/WindowProvider.hpp"
click node_main "https://github.com/carcodee/codevkengine/blob/main/src/main.cpp"
click node_flat "https://github.com/carcodee/codevkengine/blob/main/src/Rendering/Renderers/FlatRenderer.hpp"
click node_cluster "https://github.com/carcodee/codevkengine/blob/main/src/Rendering/Renderers/ClusterRenderer.hpp"
click node_base "https://github.com/carcodee/codevkengine/blob/main/src/Rendering/BaseRenderer.hpp"
click node_renderresources "https://github.com/carcodee/codevkengine/blob/main/src/Rendering/RThings/RenderingResManager.hpp"
click node_imgui "https://github.com/carcodee/codevkengine/blob/main/src/Rendering/ImguiRenderer.hpp"
click node_graph "https://github.com/carcodee/codevkengine/blob/main/src/Engine/RenderGraph.hpp"
click node_core "https://github.com/carcodee/codevkengine/blob/main/src/Engine/Core.hpp"
click node_coreimpl "https://github.com/carcodee/codevkengine/blob/main/src/Engine/CoreImpl.hpp"
click node_resources "https://github.com/carcodee/codevkengine/blob/main/src/Engine/ResourcesManager.hpp"
click node_descriptors "https://github.com/carcodee/codevkengine/blob/main/src/Engine/DescriptorCache.hpp"
click node_pipeline "https://github.com/carcodee/codevkengine/blob/main/src/Engine/Pipeline.hpp"
click node_shader "https://github.com/carcodee/codevkengine/blob/main/src/Engine/ShaderParser.hpp"
click node_sync "https://github.com/carcodee/codevkengine/blob/main/src/Engine/SyncronizationPatterns.hpp"
click node_present "https://github.com/carcodee/codevkengine/blob/main/src/Engine/PresentQueue.hpp"
click node_files "https://github.com/carcodee/codevkengine/blob/main/src/Systems/FilesManager.hpp"
click node_profiler "https://github.com/carcodee/codevkengine/blob/main/src/Engine/Profiler.hpp"
click node_nodeui "https://github.com/carcodee/codevkengine/blob/main/src/UI/GraphNodeResManagerImpl.hpp"

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_window,node_main,node_user toneBlue
class node_flat,node_cluster,node_base,node_renderresources toneAmber
class node_graph,node_core,node_coreimpl,node_resources,node_descriptors,node_pipeline,node_shader,node_sync,node_present toneMint
class node_imgui,node_files,node_profiler,node_nodeui toneRose
class node_gpu,node_cuda toneIndigo
```

## Components

### Application

- [Window provider](https://github.com/carcodee/codevkengine/blob/main/src/WindowAPI/WindowProvider.hpp): `src/WindowAPI/WindowProvider.hpp`
- [Runtime setup](https://github.com/carcodee/codevkengine/blob/main/src/main.cpp): `src/main.cpp`

### Rendering

- [Flat renderer](https://github.com/carcodee/codevkengine/blob/main/src/Rendering/Renderers/FlatRenderer.hpp): `src/Rendering/Renderers/FlatRenderer.hpp`
- [Cluster renderer](https://github.com/carcodee/codevkengine/blob/main/src/Rendering/Renderers/ClusterRenderer.hpp): `src/Rendering/Renderers/ClusterRenderer.hpp`
- [Renderer interface](https://github.com/carcodee/codevkengine/blob/main/src/Rendering/BaseRenderer.hpp): `src/Rendering/BaseRenderer.hpp`
- [Rendering resources](https://github.com/carcodee/codevkengine/blob/main/src/Rendering/RThings/RenderingResManager.hpp): `src/Rendering/RThings/RenderingResManager.hpp`

### Vulkan engine

- [Render graph](https://github.com/carcodee/codevkengine/blob/main/src/Engine/RenderGraph.hpp): `src/Engine/RenderGraph.hpp`
- [Vulkan core](https://github.com/carcodee/codevkengine/blob/main/src/Engine/Core.hpp): `src/Engine/Core.hpp`
- [Core implementation](https://github.com/carcodee/codevkengine/blob/main/src/Engine/CoreImpl.hpp): `src/Engine/CoreImpl.hpp`
- [GPU resources](https://github.com/carcodee/codevkengine/blob/main/src/Engine/ResourcesManager.hpp): `src/Engine/ResourcesManager.hpp`
- [Descriptor cache](https://github.com/carcodee/codevkengine/blob/main/src/Engine/DescriptorCache.hpp): `src/Engine/DescriptorCache.hpp`
- [Pipeline creation](https://github.com/carcodee/codevkengine/blob/main/src/Engine/Pipeline.hpp): `src/Engine/Pipeline.hpp`
- [Shader parsing](https://github.com/carcodee/codevkengine/blob/main/src/Engine/ShaderParser.hpp): `src/Engine/ShaderParser.hpp`
- [Synchronization](https://github.com/carcodee/codevkengine/blob/main/src/Engine/SyncronizationPatterns.hpp): `src/Engine/SyncronizationPatterns.hpp`
- [Queue submission](https://github.com/carcodee/codevkengine/blob/main/src/Engine/PresentQueue.hpp): `src/Engine/PresentQueue.hpp`

### Assets and tools

- [ImGui renderer](https://github.com/carcodee/codevkengine/blob/main/src/Rendering/ImguiRenderer.hpp): `src/Rendering/ImguiRenderer.hpp`
- [Asset access](https://github.com/carcodee/codevkengine/blob/main/src/Systems/FilesManager.hpp): `src/Systems/FilesManager.hpp`
- [Profiler UI](https://github.com/carcodee/codevkengine/blob/main/src/Engine/Profiler.hpp): `src/Engine/Profiler.hpp`
- [Graph editor UI](https://github.com/carcodee/codevkengine/blob/main/src/UI/GraphNodeResManagerImpl.hpp): `src/UI/GraphNodeResManagerImpl.hpp`

### Other components

- **User**
- **Vulkan device**
- **CUDA interop**

## Connections

- User → Window provider: interacts with
- Window provider → Runtime setup: provides window
- Runtime setup → Render graph: creates manager (evidence: `src/main.cpp`)
- Runtime setup → Queue submission: creates queue (evidence: `src/main.cpp`)
- Runtime setup → GPU resources: gets manager (evidence: `src/main.cpp`)
- Runtime setup → Rendering resources: gets manager (evidence: `src/main.cpp`)
- Runtime setup → Flat renderer: selects default
- User → Flat renderer: paints canvas
- Runtime setup → Cluster renderer: selects optionally
- Flat renderer → Render graph: defines passes
- Cluster renderer → Render graph: defines passes
- Renderer interface → Flat renderer: interfaces
- Renderer interface → Cluster renderer: interfaces
- Render graph → Queue submission: builds batches
- Queue submission → Vulkan device: submits work
- GPU resources → Vulkan device: manages resources
- Pipeline creation → Vulkan device: creates pipelines
- Shader parsing → Pipeline creation: reflects shaders
- Descriptor cache → Pipeline creation: binds resources
- Synchronization → Queue submission: synchronizes queues
- Render graph → CUDA interop: dispatches CUDA batches
- CUDA interop → Vulkan device: shares exported buffers
- Asset access → Flat renderer: loads assets
- Runtime setup → ImGui renderer: creates UI (evidence: `src/main.cpp`)
- ImGui renderer → Render graph: inspects execution
- Profiler UI → ImGui renderer: renders profiling
- Graph editor UI → Render graph: edits graph
- Rendering resources → Flat renderer: supplies render assets
