# john-nagle/rend3-hp architecture

> Architecture diagram of the GitHub repository john-nagle/rend3-hp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/john-nagle/rend3-hp
- Repository: https://github.com/john-nagle/rend3-hp

## Overview

##### Main Components

a) Core Renderer (rend3)
- Graph System (src/graph/)
- Resource Managers (src/managers/)
- Renderer Implementation (src/renderer/)
- Utility Systems (src/util/)

b) Extension Modules (as separate connected components)
- rend3-routine (Render Routines)
- rend3-framework (Window/Surface Management)
- rend3-gltf (Asset Loading)
- rend3-anim (Animation System)
- rend3-egui (UI Integration)

##### Data Flow and Relationships

a) Resource Flow
- Asset Loading → Resource Managers
- Resource Managers → Render Graph
- Render Graph → Output Surface

b) Control Flow
- Application → Framework
- Framework → Renderer Core
- Renderer Core → Platform Backend

##### Specific Implementation Details

Specialized subsystems:
- Material System
- Mesh Management
- Camera System
- Shadow Processing
- Animation Pipeline
- Shader Management

##### Important Relationships to Highlight

- How rend3-routine connects to the core renderer
- Relationship between rend3-framework and window management
- Demonstrate how rend3-gltf feeds into the asset pipeline
- Integration points for rend3-egui and rend3-anim

##### Technical Details

Annotations for:
- WGPU backend integration
- Shader pipeline flow
- Resource management system
- Memory handling
- Platform-specific considerations

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Application["Application Layer"]
        APP[External Applications]
        EXAMPLES[Examples]
    end

    subgraph Core["Core Rendering Layer"]
        direction TB
        subgraph Renderer["Core Renderer (rend3)"]
            direction TB
            GRAPH["Graph System"]:::core
            RESMGR["Resource Managers"]:::core
            REND["Renderer Implementation"]:::core
            UTIL["Utility Systems"]:::core
            
            subgraph Managers["Management Systems"]
                direction TB
                MAT["Material System"]:::manager
                MESH["Mesh Management"]:::manager
                CAM["Camera System"]:::manager
                SHADOW["Shadow Processing"]:::manager
                SHADER["Shader Management"]:::manager
                SKEL["Skeleton/Animation"]:::manager
            end
            
            SURF["Surface Management"]:::core
            TYPES["Resource Types"]:::core
            
            subgraph Shaders["Shader Systems"]
                CSHADER["Core Shaders"]:::shader
            end
        end
    end

    subgraph Extensions["Extension Modules"]
        direction TB
        ROUTINE["rend3-routine<br/>Render Routines"]:::extension
        FRAMEWORK["rend3-framework<br/>Window/Surface"]:::extension
        GLTF["rend3-gltf<br/>Asset Loading"]:::extension
        ANIM["rend3-anim<br/>Animation System"]:::extension
        EGUI["rend3-egui<br/>UI Integration"]:::extension
        RSHADER["Routine Shaders"]:::shader
    end

    subgraph Platform["Platform/Backend Layer"]
        WGPU["WGPU Integration"]
        PLATFORM["Platform-specific Components"]
    end

    %% Relationships
    APP --> FRAMEWORK
    EXAMPLES --> FRAMEWORK
    FRAMEWORK --> Renderer
    ROUTINE --> Renderer
    GLTF --> RESMGR
    ANIM --> SKEL
    EGUI --> Renderer
    
    RESMGR --> GRAPH
    GRAPH --> SURF
    SURF --> WGPU
    WGPU --> PLATFORM

    %% Styling
    classDef core fill:#2b5797,color:#fff
    classDef extension fill:#1e7145,color:#fff
    classDef manager fill:#b05800,color:#fff
    classDef shader fill:#4b0082,color:#fff

    %% Click Events
    click GRAPH "https://github.com/John-Nagle/rend3-hp/tree/trunk/rend3/src/graph/"
    click RESMGR "https://github.com/John-Nagle/rend3-hp/tree/trunk/rend3/src/managers/"
    click REND "https://github.com/John-Nagle/rend3-hp/tree/trunk/rend3/src/renderer/"
    click UTIL "https://github.com/John-Nagle/rend3-hp/tree/trunk/rend3/src/util/"
    click ROUTINE "https://github.com/John-Nagle/rend3-hp/tree/trunk/rend3-routine/"
    click FRAMEWORK "https://github.com/John-Nagle/rend3-hp/tree/trunk/rend3-framework/"
    click GLTF "https://github.com/John-Nagle/rend3-hp/tree/trunk/rend3-gltf/"
    click ANIM "https://github.com/John-Nagle/rend3-hp/tree/trunk/rend3-anim/"
    click EGUI "https://github.com/John-Nagle/rend3-hp/tree/trunk/rend3-egui/"
    click MAT "https://github.com/John-Nagle/rend3-hp/tree/trunk/rend3/src/managers/material/"
    click MESH "https://github.com/John-Nagle/rend3-hp/blob/trunk/rend3/src/managers/mesh.rs"
    click CAM "https://github.com/John-Nagle/rend3-hp/blob/trunk/rend3/src/managers/camera.rs"
    click SHADOW "https://github.com/John-Nagle/rend3-hp/blob/trunk/rend3/src/managers/directional/shadow_camera.rs"
    click SHADER "https://github.com/John-Nagle/rend3-hp/blob/trunk/rend3/src/shader.rs"
    click CSHADER "https://github.com/John-Nagle/rend3-hp/tree/trunk/rend3/shaders/"
    click RSHADER "https://github.com/John-Nagle/rend3-hp/tree/trunk/rend3-routine/shaders/"
    click SURF "https://github.com/John-Nagle/rend3-hp/blob/trunk/rend3/src/surface.rs"
    click SKEL "https://github.com/John-Nagle/rend3-hp/blob/trunk/rend3/src/managers/skeleton.rs"
    click TYPES "https://github.com/John-Nagle/rend3-hp/tree/trunk/rend3-types/src/"
```
