# sheepylord/gmod-model-hotloader-with-vulkan architecture

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

- Interactive diagram: https://gitdiagram.com/sheepylord/gmod-model-hotloader-with-vulkan
- Repository: https://github.com/sheepylord/gmod-model-hotloader-with-vulkan

## Overview

GSCMI-SS is a Garry’s Mod native addon for hotloading static and character models, rendering them in-game, and simulating secondary physics. The main flow starts in Garry’s Mod’s Lua-facing native module, which exposes import and model operations; imported assets are prepared as props or characters, then rendered and simulated. The README also documents model sharing/export and renderer/installation choices. Several implementation files are indexed but unsampled, so edges between those subsystems are included only where the index or README supports them.

Main entry points: [`native/module.cpp`](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/module.cpp) (Native Lua API), [`native/worker.cpp`](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/worker.cpp) (Import worker), [`native/secondary.cpp`](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/secondary.cpp) (Secondary physics), [`native/model.cpp`](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/model.cpp) (Model deformation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Addon interface"]
  node_module["Native Lua API<br/>[module.cpp]"]
  node_worker["Import worker<br/>[worker.cpp]"]
end

subgraph group_assets["Asset preparation"]
  node_props_core["Asset bundles<br/>[core.cpp]"]
  node_props_import["Format import<br/>[import.cpp]"]
  node_blend["Blender reader<br/>[blend.cpp]"]
  node_texture["Texture resolver"]
  node_material["Material processing"]
end

subgraph group_characters["Character runtime"]
  node_rig["Rig fitting<br/>[rig.cpp]"]
  node_vrm["VRM support<br/>[vrm.cpp]"]
  node_model["Model deformation<br/>[model.cpp]"]
  node_animation["Rig animation<br/>[rig_animation.cpp]"]
end

subgraph group_simulation["Rendering and physics"]
  node_renderer["Native renderer<br/>[renderer.cpp]"]
  node_physics["Physics integration<br/>[physics.cpp]"]
  node_secondary["Secondary physics<br/>[secondary.cpp]"]
  node_cpu_solver["Compute solver<br/>[compute_solver.cpp]"]
  node_vulkan_solver["Vulkan solver<br/>[vulkan_solver.cpp]"]
  node_jobs["Job system<br/>[jobs.hpp]"]
end

subgraph group_distribution["Sharing and setup"]
  node_packages["Workshop packages<br/>[packages.cpp]"]
  node_sharing["Model sharing<br/>[sharing.cpp]"]
  node_installation["Installation status<br/>[installation.cpp]"]
  node_compatibility["Compatibility profiles<br/>[compatibility.cpp]"]
end

node_gmod(("Garry’s Mod"))

node_gmod -->|"calls native API"| node_module
node_module -->|"dispatches imports"| node_worker
node_worker -->|"uses bundle API"| node_props_core
node_worker -->|"uses rig API"| node_rig
node_worker -->|"uses VRM API"| node_vrm
node_worker -->|"uses solver API"| node_cpu_solver
node_worker -->|"uses solver API"| node_vulkan_solver
node_worker -->|"uses status API"| node_installation
node_props_import -->|"builds assets"| node_props_core
node_blend -->|"resolves images"| node_texture
node_props_import -->|"uses resolver"| node_texture
node_props_import -->|"uses processing"| node_material
node_rig -->|"fits model"| node_model
node_vrm -->|"supports model"| node_model
node_model -->|"uses physics"| node_secondary
node_model -.->|"parallel work"| node_jobs
node_renderer -.->|"renders deformation"| node_model
node_renderer -->|"uses worker pool"| node_jobs
node_physics -->|"steps worlds"| node_secondary
node_physics -->|"uses solver"| node_cpu_solver
node_secondary -->|"uses solver"| node_cpu_solver
node_secondary -->|"uses solver"| node_vulkan_solver
node_secondary -.->|"queues background work"| node_jobs
node_module -->|"registers renderer"| node_renderer
node_module -->|"registers animation"| node_animation
node_module -->|"registers sharing"| node_sharing
node_module -->|"registers packages"| node_packages
node_module -->|"registers compatibility"| node_compatibility
node_module -->|"registers status"| node_installation
node_packages -->|"installs Workshop models"| node_gmod
node_sharing -->|"exports shared models"| node_gmod
node_gmod -->|"displays renderer status"| node_installation
node_gmod -.->|"may select GPU physics"| node_vulkan_solver

click node_module "https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/module.cpp"
click node_worker "https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/worker.cpp"
click node_props_core "https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/props/core.cpp"
click node_props_import "https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/props/import.cpp"
click node_blend "https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/props/blend.cpp"
click node_texture "https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/props/texture_resolver.cpp"
click node_material "https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/props/material_processing.cpp"
click node_rig "https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/rig.cpp"
click node_vrm "https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/vrm.cpp"
click node_model "https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/model.cpp"
click node_animation "https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/rig_animation.cpp"
click node_renderer "https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/renderer.cpp"
click node_physics "https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/physics.cpp"
click node_secondary "https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/secondary.cpp"
click node_cpu_solver "https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/compute_solver.cpp"
click node_vulkan_solver "https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/vulkan_solver.cpp"
click node_jobs "https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/jobs.hpp"
click node_packages "https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/packages.cpp"
click node_sharing "https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/sharing.cpp"
click node_installation "https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/installation.cpp"
click node_compatibility "https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/compatibility.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_module,node_worker toneBlue
class node_props_core,node_props_import,node_blend,node_texture,node_material toneAmber
class node_rig,node_vrm,node_model,node_animation toneMint
class node_renderer,node_physics,node_secondary,node_cpu_solver,node_vulkan_solver,node_jobs toneRose
class node_packages,node_sharing,node_installation,node_compatibility,node_gmod toneIndigo
```

## Components

### Addon interface

- [Native Lua API](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/module.cpp): `native/module.cpp`
- [Import worker](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/worker.cpp): `native/worker.cpp`

### Asset preparation

- [Asset bundles](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/props/core.cpp): `native/props/core.cpp`
- [Format import](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/props/import.cpp): `native/props/import.cpp`
- [Blender reader](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/props/blend.cpp): `native/props/blend.cpp`
- [Texture resolver](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/props/texture_resolver.cpp): `native/props/texture_resolver.cpp`
- [Material processing](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/props/material_processing.cpp): `native/props/material_processing.cpp`

### Character runtime

- [Rig fitting](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/rig.cpp): `native/rig.cpp`
- [VRM support](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/vrm.cpp): `native/vrm.cpp`
- [Model deformation](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/model.cpp): `native/model.cpp`
- [Rig animation](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/rig_animation.cpp): `native/rig_animation.cpp`

### Rendering and physics

- [Native renderer](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/renderer.cpp): `native/renderer.cpp`
- [Physics integration](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/physics.cpp): `native/physics.cpp`
- [Secondary physics](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/secondary.cpp): `native/secondary.cpp`
- [Compute solver](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/compute_solver.cpp): `native/compute_solver.cpp`
- [Vulkan solver](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/vulkan_solver.cpp): `native/vulkan_solver.cpp`
- [Job system](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/jobs.hpp): `native/jobs.hpp`

### Sharing and setup

- [Workshop packages](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/packages.cpp): `native/packages.cpp`
- [Model sharing](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/sharing.cpp): `native/sharing.cpp`
- [Installation status](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/installation.cpp): `native/installation.cpp`
- [Compatibility profiles](https://github.com/sheepylord/gmod-model-hotloader-with-vulkan/blob/main/native/compatibility.cpp): `native/compatibility.cpp`

### Other components

- **Garry’s Mod**

## Connections

- Garry’s Mod → Native Lua API: calls native API (evidence: `README.md`)
- Native Lua API → Import worker: dispatches imports (evidence: `native/module.cpp`)
- Import worker → Asset bundles: uses bundle API (evidence: `native/worker.cpp`)
- Import worker → Rig fitting: uses rig API (evidence: `native/worker.cpp`)
- Import worker → VRM support: uses VRM API (evidence: `native/worker.cpp`)
- Import worker → Compute solver: uses solver API (evidence: `native/worker.cpp`)
- Import worker → Vulkan solver: uses solver API (evidence: `native/worker.cpp`)
- Import worker → Installation status: uses status API (evidence: `native/worker.cpp`)
- Format import → Asset bundles: builds assets (evidence: `native/props/import.cpp`)
- Blender reader → Texture resolver: resolves images (evidence: `native/props/blend.cpp`)
- Format import → Texture resolver: uses resolver (evidence: `native/props/import.cpp`)
- Format import → Material processing: uses processing (evidence: `native/props/import.cpp`)
- Rig fitting → Model deformation: fits model (evidence: `native/rig.cpp`)
- VRM support → Model deformation: supports model (evidence: `native/vrm.cpp`)
- Model deformation → Secondary physics: uses physics (evidence: `native/model.cpp`)
- Model deformation → Job system: parallel work (evidence: `native/model.cpp`)
- Native renderer → Model deformation: renders deformation
- Native renderer → Job system: uses worker pool (evidence: `native/renderer.cpp`)
- Physics integration → Secondary physics: steps worlds (evidence: `native/physics.cpp`)
- Physics integration → Compute solver: uses solver (evidence: `native/physics.cpp`)
- Secondary physics → Compute solver: uses solver (evidence: `native/secondary.cpp`)
- Secondary physics → Vulkan solver: uses solver (evidence: `native/secondary.cpp`)
- Secondary physics → Job system: queues background work (evidence: `native/secondary.cpp`)
- Native Lua API → Native renderer: registers renderer (evidence: `native/module.cpp`)
- Native Lua API → Rig animation: registers animation (evidence: `native/module.cpp`)
- Native Lua API → Model sharing: registers sharing (evidence: `native/module.cpp`)
- Native Lua API → Workshop packages: registers packages (evidence: `native/module.cpp`)
- Native Lua API → Compatibility profiles: registers compatibility (evidence: `native/module.cpp`)
- Native Lua API → Installation status: registers status (evidence: `native/module.cpp`)
- Workshop packages → Garry’s Mod: installs Workshop models (evidence: `README.md`)
- Model sharing → Garry’s Mod: exports shared models (evidence: `README.md`)
- Garry’s Mod → Installation status: displays renderer status (evidence: `README.md`)
- Garry’s Mod → Vulkan solver: may select GPU physics (evidence: `README.md`)
