# elsantif/banshee architecture

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

- Interactive diagram: https://gitdiagram.com/elsantif/banshee
- Repository: https://github.com/elsantif/banshee

## Overview

Banshee is an in-development C++ 3D engine. Its visible runtime workflow is application startup, frame ticking and rendering through a World, with a selected Level representing scene content; Spectre supplies OpenGL rendering resources. The sampled code confirms the application’s window/world ownership and loop, but does not expose enough implementation to trace entity/component dispatch into draw calls. The README identifies OpenGL 4.6 as a requirement. Asset-management headers are mentioned in the umbrella header but are absent from the supplied tree, so they are not mapped.

Main entry points: [`Sources/Banshee/src/Core/Application.cpp`](https://github.com/elsantif/banshee/blob/master/Sources/Banshee/src/Core/Application.cpp) (Application loop), [`Sources/Spectre/src/Framebuffer/Framebuffer.cpp`](https://github.com/elsantif/banshee/blob/master/Sources/Spectre/src/Framebuffer/Framebuffer.cpp) (Framebuffer), [`Sources/Banshee/src/World/Level.cpp`](https://github.com/elsantif/banshee/blob/master/Sources/Banshee/src/World/Level.cpp) (Level), [`Sources/Banshee/src/Core/Window.cpp`](https://github.com/elsantif/banshee/blob/master/Sources/Banshee/src/Core/Window.cpp) (Window)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Engine runtime"]
  node_application["Application loop<br/>[Application.cpp]"]
  node_window["Window<br/>[Window.cpp]"]
  node_input["Input state<br/>[InputManager.cpp]"]
end

subgraph group_scene["Scene model"]
  node_world["World<br/>[World.cpp]"]
  node_level["Level<br/>[Level.cpp]"]
  node_entity["Entity<br/>[Entity.hpp]"]
  node_component["Component base<br/>[ComponentBase.hpp]"]
  node_camera["Camera<br/>[Camera.hpp]"]
  node_transform["Transform<br/>[Transform.cpp]"]
  node_staticmesh["Static mesh<br/>[StaticMesh.cpp]"]
  node_model["Model component<br/>[Model.cpp]"]
end

subgraph group_render["Rendering"]
  node_renderer["Renderer<br/>[Renderer.cpp]"]
  node_framebuffer["Framebuffer<br/>[Framebuffer.cpp]"]
  node_shader["Shader program<br/>[Shader.cpp]"]
  node_vertexarray["Vertex array<br/>[VertexArray.cpp]"]
  node_buffer["GPU buffers<br/>[Buffer.cpp]"]
  node_texture["Texture<br/>[Texture.cpp]"]
  node_renderbuffer["Renderbuffer<br/>[Renderbuffer.cpp]"]
end

subgraph group_support["Utilities"]
  node_poltergeist["Core utilities<br/>[Poltergeist.hpp]"]
  node_math["Math<br/>[Math.cpp]"]
  node_profiler["Profiler<br/>[Profiler.cpp]"]
end

node_user(("Engine user"))

node_user -.->|"starts"| node_application
node_application -->|"creates"| node_window
node_application -->|"initializes"| node_renderer
node_application -->|"creates"| node_world
node_application -->|"ticks and renders"| node_world
node_application -->|"swaps buffers"| node_window
node_application -->|"sets main level"| node_level
node_window -.->|"references"| node_input
node_level -.->|"references"| node_camera
node_level -.->|"references"| node_framebuffer
node_framebuffer -->|"owns"| node_shader
node_framebuffer -->|"owns"| node_vertexarray
node_framebuffer -->|"owns"| node_texture
node_framebuffer -->|"owns"| node_renderbuffer
node_framebuffer -.->|"references"| node_buffer
node_vertexarray -->|"uses"| node_buffer
node_transform -->|"inherits"| node_component
node_staticmesh -->|"inherits"| node_component

click node_application "https://github.com/elsantif/banshee/blob/master/Sources/Banshee/src/Core/Application.cpp"
click node_window "https://github.com/elsantif/banshee/blob/master/Sources/Banshee/src/Core/Window.cpp"
click node_input "https://github.com/elsantif/banshee/blob/master/Sources/Banshee/src/Core/InputManager.cpp"
click node_world "https://github.com/elsantif/banshee/blob/master/Sources/Banshee/src/World/World.cpp"
click node_level "https://github.com/elsantif/banshee/blob/master/Sources/Banshee/src/World/Level.cpp"
click node_entity "https://github.com/elsantif/banshee/blob/master/Sources/Banshee/include/Banshee/World/Entity.hpp"
click node_component "https://github.com/elsantif/banshee/blob/master/Sources/Banshee/include/Banshee/Components/ComponentBase.hpp"
click node_camera "https://github.com/elsantif/banshee/blob/master/Sources/Banshee/include/Banshee/Components/Camera.hpp"
click node_transform "https://github.com/elsantif/banshee/blob/master/Sources/Banshee/src/Components/Transform.cpp"
click node_staticmesh "https://github.com/elsantif/banshee/blob/master/Sources/Banshee/src/Components/StaticMesh.cpp"
click node_model "https://github.com/elsantif/banshee/blob/master/Sources/Banshee/src/Components/Model.cpp"
click node_renderer "https://github.com/elsantif/banshee/blob/master/Sources/Spectre/src/Renderer/Renderer.cpp"
click node_framebuffer "https://github.com/elsantif/banshee/blob/master/Sources/Spectre/src/Framebuffer/Framebuffer.cpp"
click node_shader "https://github.com/elsantif/banshee/blob/master/Sources/Spectre/src/Shader/Shader.cpp"
click node_vertexarray "https://github.com/elsantif/banshee/blob/master/Sources/Spectre/src/VertexArray/VertexArray.cpp"
click node_buffer "https://github.com/elsantif/banshee/blob/master/Sources/Spectre/src/Buffer/Buffer.cpp"
click node_texture "https://github.com/elsantif/banshee/blob/master/Sources/Spectre/src/Texture/Texture.cpp"
click node_renderbuffer "https://github.com/elsantif/banshee/blob/master/Sources/Spectre/src/Renderbuffer/Renderbuffer.cpp"
click node_poltergeist "https://github.com/elsantif/banshee/blob/master/Sources/Poltergeist/include/Poltergeist/Poltergeist.hpp"
click node_math "https://github.com/elsantif/banshee/blob/master/Sources/Poltergeist/src/Math/Math.cpp"
click node_profiler "https://github.com/elsantif/banshee/blob/master/Sources/Poltergeist/src/Profiler/Profiler.cpp"

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_application,node_window,node_input,node_user toneBlue
class node_world,node_level,node_entity,node_component,node_camera,node_transform,node_staticmesh,node_model toneAmber
class node_renderer,node_framebuffer,node_shader,node_vertexarray,node_buffer,node_texture,node_renderbuffer toneMint
class node_poltergeist,node_math,node_profiler toneRose
```

## Components

### Engine runtime

- [Application loop](https://github.com/elsantif/banshee/blob/master/Sources/Banshee/src/Core/Application.cpp): `Sources/Banshee/src/Core/Application.cpp`
- [Window](https://github.com/elsantif/banshee/blob/master/Sources/Banshee/src/Core/Window.cpp): `Sources/Banshee/src/Core/Window.cpp`
- [Input state](https://github.com/elsantif/banshee/blob/master/Sources/Banshee/src/Core/InputManager.cpp): `Sources/Banshee/src/Core/InputManager.cpp`

### Scene model

- [World](https://github.com/elsantif/banshee/blob/master/Sources/Banshee/src/World/World.cpp): `Sources/Banshee/src/World/World.cpp`
- [Level](https://github.com/elsantif/banshee/blob/master/Sources/Banshee/src/World/Level.cpp): `Sources/Banshee/src/World/Level.cpp`
- [Entity](https://github.com/elsantif/banshee/blob/master/Sources/Banshee/include/Banshee/World/Entity.hpp): `Sources/Banshee/include/Banshee/World/Entity.hpp`
- [Component base](https://github.com/elsantif/banshee/blob/master/Sources/Banshee/include/Banshee/Components/ComponentBase.hpp): `Sources/Banshee/include/Banshee/Components/ComponentBase.hpp`
- [Camera](https://github.com/elsantif/banshee/blob/master/Sources/Banshee/include/Banshee/Components/Camera.hpp): `Sources/Banshee/include/Banshee/Components/Camera.hpp`
- [Transform](https://github.com/elsantif/banshee/blob/master/Sources/Banshee/src/Components/Transform.cpp): `Sources/Banshee/src/Components/Transform.cpp`
- [Static mesh](https://github.com/elsantif/banshee/blob/master/Sources/Banshee/src/Components/StaticMesh.cpp): `Sources/Banshee/src/Components/StaticMesh.cpp`
- [Model component](https://github.com/elsantif/banshee/blob/master/Sources/Banshee/src/Components/Model.cpp): `Sources/Banshee/src/Components/Model.cpp`

### Rendering

- [Renderer](https://github.com/elsantif/banshee/blob/master/Sources/Spectre/src/Renderer/Renderer.cpp): `Sources/Spectre/src/Renderer/Renderer.cpp`
- [Framebuffer](https://github.com/elsantif/banshee/blob/master/Sources/Spectre/src/Framebuffer/Framebuffer.cpp): `Sources/Spectre/src/Framebuffer/Framebuffer.cpp`
- [Shader program](https://github.com/elsantif/banshee/blob/master/Sources/Spectre/src/Shader/Shader.cpp): `Sources/Spectre/src/Shader/Shader.cpp`
- [Vertex array](https://github.com/elsantif/banshee/blob/master/Sources/Spectre/src/VertexArray/VertexArray.cpp): `Sources/Spectre/src/VertexArray/VertexArray.cpp`
- [GPU buffers](https://github.com/elsantif/banshee/blob/master/Sources/Spectre/src/Buffer/Buffer.cpp): `Sources/Spectre/src/Buffer/Buffer.cpp`
- [Texture](https://github.com/elsantif/banshee/blob/master/Sources/Spectre/src/Texture/Texture.cpp): `Sources/Spectre/src/Texture/Texture.cpp`
- [Renderbuffer](https://github.com/elsantif/banshee/blob/master/Sources/Spectre/src/Renderbuffer/Renderbuffer.cpp): `Sources/Spectre/src/Renderbuffer/Renderbuffer.cpp`

### Utilities

- [Core utilities](https://github.com/elsantif/banshee/blob/master/Sources/Poltergeist/include/Poltergeist/Poltergeist.hpp): `Sources/Poltergeist/include/Poltergeist/Poltergeist.hpp`
- [Math](https://github.com/elsantif/banshee/blob/master/Sources/Poltergeist/src/Math/Math.cpp): `Sources/Poltergeist/src/Math/Math.cpp`
- [Profiler](https://github.com/elsantif/banshee/blob/master/Sources/Poltergeist/src/Profiler/Profiler.cpp): `Sources/Poltergeist/src/Profiler/Profiler.cpp`

### Other components

- **Engine user**

## Connections

- Engine user → Application loop: starts
- Application loop → Window: creates (evidence: `Sources/Banshee/src/Core/Application.cpp`)
- Application loop → Renderer: initializes (evidence: `Sources/Banshee/src/Core/Application.cpp`)
- Application loop → World: creates (evidence: `Sources/Banshee/src/Core/Application.cpp`)
- Application loop → World: ticks and renders (evidence: `Sources/Banshee/src/Core/Application.cpp`)
- Application loop → Window: swaps buffers (evidence: `Sources/Banshee/src/Core/Application.cpp`)
- Application loop → Level: sets main level
- Window → Input state: references
- Level → Camera: references
- Level → Framebuffer: references
- Framebuffer → Shader program: owns
- Framebuffer → Vertex array: owns
- Framebuffer → Texture: owns
- Framebuffer → Renderbuffer: owns
- Framebuffer → GPU buffers: references
- Vertex array → GPU buffers: uses
- Transform → Component base: inherits
- Static mesh → Component base: inherits
