How san7o/brenta-engine works
Project type and purpose
• Brenta Engine is a modular 3D engine library/tool written in modern C++ and OpenGL, employing an Entity-Component-System (ECS) architecture.
• It provides reusable submodules (Screen, Audio, Input, Text, Particles, ECS), a core Engine builder API, an example “game” demo, and example programs.
File structure
• Top‐level directories:
• engine/ → core engine submodules (headers, sources, shaders)
• game/ → demo application using the engine and ECS (entities, systems, callbacks)
• examples/ → stand-alone example programs illustrating engine usage
• tests/ → unit tests for engine components
• assets/ → art assets (models, textures, audio, docs)
• lib/ → static third-party libraries (SDL3, Assimp, FreeType, HarfBuzz)
• / → bundled headers for dependencies (GLFW, SDL3, GLM, ImGui, stb_image)
• Build & config files: CMakeLists.txt, BUILD.md, Makefile, flake.nix, doxygen.conf.
README for insights
• Submodules are independent and pluggable via a builder API.
• ECS is provided by viotecs (external) and integrated.
• ImGui is included for debugging UIs.
• Dependencies: SDL3/GLFW for windowing, GLAD for OpenGL loading, Assimp for model import, FreeType & HarfBuzz for text.
1. Engine Core
– Builder API (engine::builder)
– Submodules: Screen, Audio, Input, Logger, Text, Particles, ECS interface
2. ECS Layer
– World manager, Entities, Components, Systems (fps_system, physics_system, etc.)
3. Rendering Pipeline
– OpenGL context (via Screen)
– Shader manager, Mesh/model loader (Assimp), Texture loader (stb_image)
– Framebuffer, GUI (ImGui)
4. Demo Game
– Callback handlers (camera, input, audio triggers)
– Game‐specific entities & components
5. Examples
– Independent executables interfacing with Engine Core
6. Third-party libs & headers
– SDL3, GLFW, GLAD, GLM, Assimp, FreeType, HarfBuzz, stb_image, ImGui
7. Assets
– Models, Textures, Audio
• Engine Core ↔ ECS Layer (engine tick invokes registered systems on entities).
• Screen Module → OS/windowing API (SDL3/GLFW) → OpenGL driver.
• Rendering Pipeline → GPU via GLAD/OpenGL calls.
• Model/Text loader modules → Assimp, FreeType/Harfbuzz → Asset files.
• ImGui Module → Engine Core for debug UI.
c. Architectural patterns & principles:
• Entity-Component-System for modular game logic separation.
• Builder pattern for Engine configuration.
• Modular submodule isolation (each subsystem can be toggled on/off).
• Layered architecture (Platform → Engine Core → Game/Examples).
d. Key technologies & frameworks:
• C++17/20, OpenGL (GLAD), SDL3/GLFW, ImGui, Assimp, FreeType, HarfBuzz, GLM maths.