# anjolaolubusi/procdemic architecture

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

- Interactive diagram: https://gitdiagram.com/anjolaolubusi/procdemic
- Repository: https://github.com/anjolaolubusi/procdemic

## Overview

Prodemic is a small OpenGL 3D application; the visible setup creates a procedural island mesh, registers scene objects and textures, and runs through a GLFW window. Its internal layers cover geometry, scene objects and lighting, rendering resources, and window/camera support. The README identifies GLFW, OpenGL, and GLAD as runtime dependencies. Several source excerpts are incomplete, so uncertain runtime connections are omitted or marked dashed rather than treated as verified calls.

Main entry points: [`src/main.cpp`](https://github.com/anjolaolubusi/procdemic/blob/main/src/main.cpp) (Application Loop), [`src/Mesh.h`](https://github.com/anjolaolubusi/procdemic/blob/main/src/Mesh.h) (Mesh Buffers), [`src/Window.h`](https://github.com/anjolaolubusi/procdemic/blob/main/src/Window.h) (Window and Input), [`src/VertexManager.h`](https://github.com/anjolaolubusi/procdemic/blob/main/src/VertexManager.h) (Vertex Data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_main["Application Loop<br/>[main.cpp]"]
  node_logger["Logging<br/>[Logger.h]"]
end

subgraph group_scene["Scene and Geometry"]
  node_procgen["Procedural Geometry<br/>[ProcGen.h]"]
  node_vertices["Vertex Data<br/>[VertexManager.h]"]
  node_objects["Objects and Lights<br/>[Objects.h]"]
  node_transforms["Transforms<br/>[Transform.h]"]
end

subgraph group_render["Rendering Resources"]
  node_mesh["Mesh Buffers<br/>[Mesh.h]"]
  node_texture["Texture Loading<br/>[Texture.h]"]
  node_shader["Shader Programs<br/>[Shader.h]"]
  node_stb["Image Decoder<br/>[stb_image.h]"]
  node_glm["Math Types<br/>[glm.hpp]"]
  node_glad["OpenGL Loader<br/>[glad.h]"]
end

subgraph group_support["Window and UI"]
  node_window["Window and Input<br/>[Window.h]"]
  node_camera["Camera<br/>[Camera.h]"]
  node_imgui["ImGui UI<br/>[imgui.h]"]
end

node_user(("User"))
node_glfw["GLFW"]
node_opengl["OpenGL"]

node_user -.->|"operates"| node_main
node_main -->|"uses"| node_window
node_main -->|"generates"| node_procgen
node_main -->|"fills"| node_vertices
node_main -->|"registers"| node_objects
node_main -->|"loads"| node_texture
node_main -.->|"uses"| node_camera
node_main -.->|"uses"| node_imgui
node_procgen -->|"populates"| node_vertices
node_objects -->|"constructs"| node_mesh
node_objects -->|"creates"| node_transforms
node_mesh -->|"reads"| node_vertices
node_mesh -->|"references"| node_texture
node_mesh -.->|"logs"| node_logger
node_shader -->|"logs"| node_logger
node_camera -.->|"uses"| node_window
node_window -.->|"references"| node_logger
node_texture -.->|"decodes"| node_stb
node_main -.->|"uses"| node_glad
node_mesh -.->|"uploads"| node_opengl
node_shader -.->|"compiles"| node_opengl
node_window -.->|"creates window"| node_glfw
node_vertices -->|"uses types"| node_glm

click node_main "https://github.com/anjolaolubusi/procdemic/blob/main/src/main.cpp"
click node_procgen "https://github.com/anjolaolubusi/procdemic/blob/main/src/ProcGen.h"
click node_vertices "https://github.com/anjolaolubusi/procdemic/blob/main/src/VertexManager.h"
click node_objects "https://github.com/anjolaolubusi/procdemic/blob/main/src/Objects.h"
click node_transforms "https://github.com/anjolaolubusi/procdemic/blob/main/src/Transform.h"
click node_mesh "https://github.com/anjolaolubusi/procdemic/blob/main/src/Mesh.h"
click node_texture "https://github.com/anjolaolubusi/procdemic/blob/main/src/Texture.h"
click node_shader "https://github.com/anjolaolubusi/procdemic/blob/main/src/Shader.h"
click node_logger "https://github.com/anjolaolubusi/procdemic/blob/main/src/Logger.h"
click node_window "https://github.com/anjolaolubusi/procdemic/blob/main/src/Window.h"
click node_camera "https://github.com/anjolaolubusi/procdemic/blob/main/src/Camera.h"
click node_imgui "https://github.com/anjolaolubusi/procdemic/blob/main/include/imgui/imgui.h"
click node_stb "https://github.com/anjolaolubusi/procdemic/blob/main/include/stb_image/stb_image.h"
click node_glm "https://github.com/anjolaolubusi/procdemic/blob/main/include/glm/glm.hpp"
click node_glad "https://github.com/anjolaolubusi/procdemic/blob/main/include/glad/glad.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_main,node_logger,node_user toneBlue
class node_procgen,node_vertices,node_objects,node_transforms toneAmber
class node_mesh,node_texture,node_shader,node_stb,node_glm,node_glad toneMint
class node_window,node_camera,node_imgui toneRose
class node_glfw,node_opengl toneIndigo
```

## Components

### Application

- [Application Loop](https://github.com/anjolaolubusi/procdemic/blob/main/src/main.cpp): `src/main.cpp`
- [Logging](https://github.com/anjolaolubusi/procdemic/blob/main/src/Logger.h): `src/Logger.h`

### Scene and Geometry

- [Procedural Geometry](https://github.com/anjolaolubusi/procdemic/blob/main/src/ProcGen.h): `src/ProcGen.h`
- [Vertex Data](https://github.com/anjolaolubusi/procdemic/blob/main/src/VertexManager.h): `src/VertexManager.h`
- [Objects and Lights](https://github.com/anjolaolubusi/procdemic/blob/main/src/Objects.h): `src/Objects.h`
- [Transforms](https://github.com/anjolaolubusi/procdemic/blob/main/src/Transform.h): `src/Transform.h`

### Rendering Resources

- [Mesh Buffers](https://github.com/anjolaolubusi/procdemic/blob/main/src/Mesh.h): `src/Mesh.h`
- [Texture Loading](https://github.com/anjolaolubusi/procdemic/blob/main/src/Texture.h): `src/Texture.h`
- [Shader Programs](https://github.com/anjolaolubusi/procdemic/blob/main/src/Shader.h): `src/Shader.h`
- [Image Decoder](https://github.com/anjolaolubusi/procdemic/blob/main/include/stb_image/stb_image.h): `include/stb_image/stb_image.h`
- [Math Types](https://github.com/anjolaolubusi/procdemic/blob/main/include/glm/glm.hpp): `include/glm/glm.hpp`
- [OpenGL Loader](https://github.com/anjolaolubusi/procdemic/blob/main/include/glad/glad.h): `include/glad/glad.h`

### Window and UI

- [Window and Input](https://github.com/anjolaolubusi/procdemic/blob/main/src/Window.h): `src/Window.h`
- [Camera](https://github.com/anjolaolubusi/procdemic/blob/main/src/Camera.h): `src/Camera.h`
- [ImGui UI](https://github.com/anjolaolubusi/procdemic/blob/main/include/imgui/imgui.h): `include/imgui/imgui.h`

### Other components

- **User**
- **GLFW**
- **OpenGL**

## Connections

- User → Application Loop: operates
- Application Loop → Window and Input: uses (evidence: `src/main.cpp`)
- Application Loop → Procedural Geometry: generates (evidence: `src/main.cpp`)
- Application Loop → Vertex Data: fills (evidence: `src/main.cpp`)
- Application Loop → Objects and Lights: registers (evidence: `src/main.cpp`)
- Application Loop → Texture Loading: loads (evidence: `src/main.cpp`)
- Application Loop → Camera: uses (evidence: `src/main.cpp`)
- Application Loop → ImGui UI: uses
- Procedural Geometry → Vertex Data: populates (evidence: `src/ProcGen.h`)
- Objects and Lights → Mesh Buffers: constructs (evidence: `src/Objects.h`)
- Objects and Lights → Transforms: creates (evidence: `src/Objects.h`)
- Mesh Buffers → Vertex Data: reads (evidence: `src/Mesh.h`)
- Mesh Buffers → Texture Loading: references (evidence: `src/Mesh.h`)
- Mesh Buffers → Logging: logs (evidence: `src/Mesh.h`)
- Shader Programs → Logging: logs (evidence: `src/Shader.h`)
- Camera → Window and Input: uses (evidence: `src/Camera.h`)
- Window and Input → Logging: references (evidence: `src/Window.h`)
- Texture Loading → Image Decoder: decodes
- Application Loop → OpenGL Loader: uses
- Mesh Buffers → OpenGL: uploads
- Shader Programs → OpenGL: compiles
- Window and Input → GLFW: creates window
- Vertex Data → Math Types: uses types (evidence: `src/VertexManager.h`)
