# ahwootech/brutal architecture

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

- Interactive diagram: https://gitdiagram.com/ahwootech/brutal
- Repository: https://github.com/ahwootech/brutal

## Overview

BRUTAL is a low-level C# game and engine framework, not a complete engine. Its principal workflow is that a game developer selects libraries, initializes a platform window, and adds optional systems such as UI, rendering, jobs, audio, physics, and asset loading. The graph emphasizes capabilities present in the supplied tree and documented composition; unsampled or absent implementations are not inferred.

Main entry points: [`Brutal.ImGui/Generated-Internal/Functions/ImGui.gen.cs`](https://github.com/ahwootech/brutal/blob/main/Brutal.ImGui/Generated-Internal/Functions/ImGui.gen.cs) (Dear ImGui), [`Brutal.Collections/NativeList/NativeList.cs`](https://github.com/ahwootech/brutal/blob/main/Brutal.Collections/NativeList/NativeList.cs) (Native collections), [`Brutal.ImGui.Backends/PlatformBackends/GlfwBackend.cs`](https://github.com/ahwootech/brutal/blob/main/Brutal.ImGui.Backends/PlatformBackends/GlfwBackend.cs) (ImGui GLFW backend), [`Brutal.ImGui.Backends/RendererBackends/VulkanBackend.cs`](https://github.com/ahwootech/brutal/blob/main/Brutal.ImGui.Backends/RendererBackends/VulkanBackend.cs) (ImGui Vulkan backend)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_foundation["Core foundations"]
  node_core_types["Core types<br/>[Attributes.cs]"]
  node_pointers["Pointer helpers<br/>[Ptr.cs]"]
  node_memory["Memory management<br/>[Mem.cs]"]
  node_collections["Native collections<br/>[NativeList.cs]"]
  node_strings["String handling<br/>[Utf8Path.cs]"]
  node_numerics["Math and numerics"]
end

subgraph group_runtime["Runtime systems"]
  node_jobs["Job scheduling<br/>[JobScheduler.cs]"]
  node_logging["Logging<br/>[LogCategory.cs]"]
  node_localization["Localization"]
end

subgraph group_platform["Platform and graphics"]
  node_glfw["Window and input<br/>[Glfw.cs]"]
  node_imgui["Dear ImGui<br/>[ImGui.gen.cs]"]
  node_glfw_backend["ImGui GLFW backend<br/>[GlfwBackend.cs]"]
  node_vulkan_backend["ImGui Vulkan backend<br/>[VulkanBackend.cs]"]
end

subgraph group_assets["Assets and content"]
  node_gltf["glTF loading<br/>[GltfUtility.cs]"]
  node_image_decode["Image decoding<br/>[Stb.cs]"]
  node_texture_formats["Texture formats<br/>[TextureFormat.cs]"]
  node_mesh_tools["Mesh utilities<br/>[ProcGenMesh.cs]"]
end

subgraph group_integrations["Native integrations"]
  node_opengl["OpenGL bindings<br/>[Loader.gen.cs]"]
  node_box2d["2D physics<br/>[Structs.gen.cs]"]
  node_audio["FMOD audio<br/>[Fmod.cs]"]
  node_monitor["Runtime monitoring<br/>[Monitor.cs]"]
  node_vulkan_api["Vulkan API<br/>[DeviceEx.cs]"]
end

node_developer(("Game developer"))

node_developer -->|"initializes window"| node_glfw
node_developer -->|"adds parallelism"| node_jobs
node_developer -->|"adds debug UI"| node_imgui
node_developer -->|"adds audio"| node_audio
node_glfw_backend -->|"handles platform input"| node_glfw
node_glfw_backend -->|"feeds UI events"| node_imgui
node_vulkan_backend -->|"renders UI"| node_imgui
node_vulkan_backend -.->|"uses graphics API"| node_vulkan_api
node_collections -->|"copies and frees"| node_memory
node_collections -->|"uses pointers"| node_pointers
node_gltf -->|"references images"| node_image_decode
node_developer -->|"selects graphics bindings"| node_opengl
node_developer -->|"selects 2D physics"| node_box2d
node_developer -->|"loads assets"| node_gltf
node_developer -->|"adds monitoring"| node_monitor

click node_core_types "https://github.com/ahwootech/brutal/blob/main/Brutal.Core/Attributes.cs"
click node_pointers "https://github.com/ahwootech/brutal/blob/main/Brutal.Core/Pointers/Ptr.cs"
click node_memory "https://github.com/ahwootech/brutal/blob/main/Brutal.Memory/Mem.cs"
click node_collections "https://github.com/ahwootech/brutal/blob/main/Brutal.Collections/NativeList/NativeList.cs"
click node_strings "https://github.com/ahwootech/brutal/blob/main/Brutal.Strings/Utf8Path.cs"
click node_numerics "https://github.com/ahwootech/brutal/blob/main/Brutal.Numerics/Matrix/double4x4/double4x4.numerics.gen.cs"
click node_jobs "https://github.com/ahwootech/brutal/blob/main/Brutal.Concurrency/Jobs/JobScheduler.cs"
click node_logging "https://github.com/ahwootech/brutal/blob/main/Brutal.Logging/LogCategory.cs"
click node_localization "https://github.com/ahwootech/brutal/blob/main/Brutal.Localization/LString.Format.gen.cs"
click node_glfw "https://github.com/ahwootech/brutal/blob/main/Brutal.Glfw/Glfw.cs"
click node_imgui "https://github.com/ahwootech/brutal/blob/main/Brutal.ImGui/Generated-Internal/Functions/ImGui.gen.cs"
click node_glfw_backend "https://github.com/ahwootech/brutal/blob/main/Brutal.ImGui.Backends/PlatformBackends/GlfwBackend.cs"
click node_vulkan_backend "https://github.com/ahwootech/brutal/blob/main/Brutal.ImGui.Backends/RendererBackends/VulkanBackend.cs"
click node_opengl "https://github.com/ahwootech/brutal/blob/main/Brutal.OpenGl/Loader.gen.cs"
click node_box2d "https://github.com/ahwootech/brutal/blob/main/Brutal.Box2D/Structs.gen.cs"
click node_audio "https://github.com/ahwootech/brutal/blob/main/Brutal.Fmod/FmodCoreApi/Manual/Fmod.cs"
click node_gltf "https://github.com/ahwootech/brutal/blob/main/Brutal.Gltf/GltfApi/GltfUtility.cs"
click node_image_decode "https://github.com/ahwootech/brutal/blob/main/Brutal.Stb/Stb.cs"
click node_texture_formats "https://github.com/ahwootech/brutal/blob/main/Brutal.Texture/TextureFormat.cs"
click node_mesh_tools "https://github.com/ahwootech/brutal/blob/main/Brutal.Render.Mesh/ProcGenMesh.cs"
click node_monitor "https://github.com/ahwootech/brutal/blob/main/Brutal.Monitor.Host/Monitor.cs"
click node_vulkan_api "https://github.com/ahwootech/brutal/blob/main/Brutal.Vulkan.Abstractions/Classes/DeviceEx.cs"

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_core_types,node_pointers,node_memory,node_collections,node_strings,node_numerics toneBlue
class node_jobs,node_logging,node_localization toneAmber
class node_glfw,node_imgui,node_glfw_backend,node_vulkan_backend toneMint
class node_gltf,node_image_decode,node_texture_formats,node_mesh_tools toneRose
class node_opengl,node_box2d,node_audio,node_monitor,node_vulkan_api,node_developer toneIndigo
```

## Components

### Core foundations

- [Core types](https://github.com/ahwootech/brutal/blob/main/Brutal.Core/Attributes.cs): `Brutal.Core/Attributes.cs`
- [Pointer helpers](https://github.com/ahwootech/brutal/blob/main/Brutal.Core/Pointers/Ptr.cs): `Brutal.Core/Pointers/Ptr.cs`
- [Memory management](https://github.com/ahwootech/brutal/blob/main/Brutal.Memory/Mem.cs): `Brutal.Memory/Mem.cs`
- [Native collections](https://github.com/ahwootech/brutal/blob/main/Brutal.Collections/NativeList/NativeList.cs): `Brutal.Collections/NativeList/NativeList.cs`
- [String handling](https://github.com/ahwootech/brutal/blob/main/Brutal.Strings/Utf8Path.cs): `Brutal.Strings/Utf8Path.cs`
- [Math and numerics](https://github.com/ahwootech/brutal/blob/main/Brutal.Numerics/Matrix/double4x4/double4x4.numerics.gen.cs): `Brutal.Numerics/Matrix/double4x4/double4x4.numerics.gen.cs`

### Runtime systems

- [Job scheduling](https://github.com/ahwootech/brutal/blob/main/Brutal.Concurrency/Jobs/JobScheduler.cs): `Brutal.Concurrency/Jobs/JobScheduler.cs`
- [Logging](https://github.com/ahwootech/brutal/blob/main/Brutal.Logging/LogCategory.cs): `Brutal.Logging/LogCategory.cs`
- [Localization](https://github.com/ahwootech/brutal/blob/main/Brutal.Localization/LString.Format.gen.cs): `Brutal.Localization/LString.Format.gen.cs`

### Platform and graphics

- [Window and input](https://github.com/ahwootech/brutal/blob/main/Brutal.Glfw/Glfw.cs): `Brutal.Glfw/Glfw.cs`
- [Dear ImGui](https://github.com/ahwootech/brutal/blob/main/Brutal.ImGui/Generated-Internal/Functions/ImGui.gen.cs): `Brutal.ImGui/Generated-Internal/Functions/ImGui.gen.cs`
- [ImGui GLFW backend](https://github.com/ahwootech/brutal/blob/main/Brutal.ImGui.Backends/PlatformBackends/GlfwBackend.cs): `Brutal.ImGui.Backends/PlatformBackends/GlfwBackend.cs`
- [ImGui Vulkan backend](https://github.com/ahwootech/brutal/blob/main/Brutal.ImGui.Backends/RendererBackends/VulkanBackend.cs): `Brutal.ImGui.Backends/RendererBackends/VulkanBackend.cs`

### Assets and content

- [glTF loading](https://github.com/ahwootech/brutal/blob/main/Brutal.Gltf/GltfApi/GltfUtility.cs): `Brutal.Gltf/GltfApi/GltfUtility.cs`
- [Image decoding](https://github.com/ahwootech/brutal/blob/main/Brutal.Stb/Stb.cs): `Brutal.Stb/Stb.cs`
- [Texture formats](https://github.com/ahwootech/brutal/blob/main/Brutal.Texture/TextureFormat.cs): `Brutal.Texture/TextureFormat.cs`
- [Mesh utilities](https://github.com/ahwootech/brutal/blob/main/Brutal.Render.Mesh/ProcGenMesh.cs): `Brutal.Render.Mesh/ProcGenMesh.cs`

### Native integrations

- [OpenGL bindings](https://github.com/ahwootech/brutal/blob/main/Brutal.OpenGl/Loader.gen.cs): `Brutal.OpenGl/Loader.gen.cs`
- [2D physics](https://github.com/ahwootech/brutal/blob/main/Brutal.Box2D/Structs.gen.cs): `Brutal.Box2D/Structs.gen.cs`
- [FMOD audio](https://github.com/ahwootech/brutal/blob/main/Brutal.Fmod/FmodCoreApi/Manual/Fmod.cs): `Brutal.Fmod/FmodCoreApi/Manual/Fmod.cs`
- [Runtime monitoring](https://github.com/ahwootech/brutal/blob/main/Brutal.Monitor.Host/Monitor.cs): `Brutal.Monitor.Host/Monitor.cs`
- [Vulkan API](https://github.com/ahwootech/brutal/blob/main/Brutal.Vulkan.Abstractions/Classes/DeviceEx.cs): `Brutal.Vulkan.Abstractions/Classes/DeviceEx.cs`

### Other components

- **Game developer**

## Connections

- Game developer → Window and input: initializes window (evidence: `README.md`)
- Game developer → Job scheduling: adds parallelism (evidence: `README.md`)
- Game developer → Dear ImGui: adds debug UI (evidence: `README.md`)
- Game developer → FMOD audio: adds audio (evidence: `README.md`)
- ImGui GLFW backend → Window and input: handles platform input (evidence: `Brutal.ImGui.Backends/PlatformBackends/GlfwBackend.cs`)
- ImGui GLFW backend → Dear ImGui: feeds UI events (evidence: `Brutal.ImGui.Backends/PlatformBackends/GlfwBackend.cs`)
- ImGui Vulkan backend → Dear ImGui: renders UI (evidence: `Brutal.ImGui.Backends/RendererBackends/VulkanBackend.cs`)
- ImGui Vulkan backend → Vulkan API: uses graphics API · Inferred; not shown in the code that was read. (evidence: `Brutal.ImGui.Backends/RendererBackends/VulkanBackend.cs`)
- Native collections → Memory management: copies and frees (evidence: `Brutal.Collections/NativeList/NativeList.cs`)
- Native collections → Pointer helpers: uses pointers (evidence: `Brutal.Collections/NativeList/NativeList.cs`)
- glTF loading → Image decoding: references images (evidence: `Brutal.Gltf/GltfApi/GltfUtility.cs`)
- Game developer → OpenGL bindings: selects graphics bindings (evidence: `README.md`)
- Game developer → 2D physics: selects 2D physics (evidence: `README.md`)
- Game developer → glTF loading: loads assets (evidence: `README.md`)
- Game developer → Runtime monitoring: adds monitoring (evidence: `README.md`)
