How jan-peltner/rlgl-template works
Main Components
• Application Core: Represented by src/main.c where the core logic resides.
• Window Manager: Represented by src/window.c and its header (window.h) that manage the window setup/configuration.
• Shader System: Comprising two files in the shaders/ directory — main.vert for the vertex shader and main.frag for the fragment shader. These are loaded and used by the Application Core.
• External Dependencies: Include raylib (for graphics handling and windowing) and the OpenGL 3.3+ support. Also note the C compiler and build environment required.
• Build & Run Scripts: The build.sh and run.sh scripts that automate the compilation and execution of the project (leading to a bin/ output folder).
Out Component Relationships
• The Application Core (main.c) is the central orchestrator that initializes components.
• It calls functions from the Window Manager to create and configure the application window.
• The Application Core loads and applies the shader files to create the desired shader effects.
• Build process: from build.sh generating output in bin/ and run.sh consuming that output.
Architectural Patterns & Design Principles
• Modular Design: Shaders are maintained as external files, making it easy to customize visual effects without touching the core codebase.
• External Library Integration: Emphasize how raylib and OpenGL provide core graphical functionalities without the need for extensive in-house implementations.
Final Touch
This detailed, structured approach will provide a comprehensive overview of the system’s architecture, making it easy to understand component interactions and enhancing future maintainability or customization. Happy diagramming!