How thecherno/hazel works
Hazel is an early-stage Windows-oriented application and rendering engine, with Hazelnut as its scene editor and Sandbox as a client application. The principal workflow is editing a project scene and its entities in Hazelnut, saving or loading that scene, then running or simulating it with rendering and managed scripts. The graph also shows the engine’s application loop, graphics backend, and 2D physics-related scene components. Wiring is limited to relationships shown in sampled source or stated by the README; unsampled subsystems are represented without speculative call edges.
Main entry points: EditorLayer.cpp Editor workflow · Application.cpp Application loop · Scene.cpp Scene and entities · SceneSerializer.cpp Scene serialization
Components 23
Scene editor
- Hazelnut app
Hazelnut/src/HazelnutApp.cpp - Editor workflow
Hazelnut/src/EditorLayer.cpp - Scene hierarchy
Hazelnut/src/Panels/SceneHierarchyPanel.cpp - Content browser
Hazelnut/src/Panels/ContentBrowserPanel.cpp
Engine runtime
- Application loop
Hazel/src/Hazel/Core/Application.cpp - Window and events
Hazel/src/Platform/Windows/WindowsWindow.cpp - Input handling
Hazel/src/Hazel/Core/Input.h - ImGui layer
Hazel/src/Hazel/ImGui/ImGuiLayer.cpp - Sandbox client
Sandbox/src/SandboxApp.cpp
Scene and scripting
- Project settings
Hazel/src/Hazel/Project/Project.cpp - Scene and entities
Hazel/src/Hazel/Scene/Scene.cpp - Scene components
Hazel/src/Hazel/Scene/Components.h - Scene serialization
Hazel/src/Hazel/Scene/SceneSerializer.cpp - Managed scripting
Hazel/src/Hazel/Scripting/ScriptEngine.cpp - Script bindings
Hazel/src/Hazel/Scripting/ScriptGlue.cpp - C# entity API
Hazel-ScriptCore/Source/Hazel/Scene/Entity.cs - 2D physics types
Hazel/src/Hazel/Physics/Physics2D.h
Rendering
- Renderer
Hazel/src/Hazel/Renderer/Renderer.cpp - 2D renderer
Hazel/src/Hazel/Renderer/Renderer2D.cpp - Editor framebuffer
Hazel/src/Hazel/Renderer/Framebuffer.cpp - Render commands
Hazel/src/Hazel/Renderer/RenderCommand.cpp - OpenGL backend
Hazel/src/Platform/OpenGL/OpenGLRendererAPI.cpp
Other components
- Editor user
Connections 25
- Editor user → Hazelnut app: uses
- Hazelnut app → Application loop: starts
- Application loop → Window and events: creates and updates
- Window and events → Application loop: dispatches events
- Application loop → ImGui layer: runs overlay
- Application loop → Renderer: initializes
- Application loop → Editor workflow: updates layer
- Editor workflow → Project settings: opens project
- Editor workflow → Scene and entities: edits scene
- Editor workflow → Scene hierarchy: draws panel
- Editor workflow → Content browser: uses browser
- Editor workflow → Scene serialization: saves and loads
- Editor workflow → Editor framebuffer: renders viewport
- Editor workflow → 2D renderer: draws overlays
- Scene hierarchy → Scene and entities: edits entities
- Scene and entities → Scene components: stores
- Scene and entities → 2D physics types: has physics components
- Scene serialization → Scene and entities: reads and writes
- Scene serialization → Managed scripting: reads script fields
- Managed scripting → Script bindings: registers bindings
- C# entity API → Script bindings: exposes managed calls
- Editor workflow → Managed scripting: reloads scripts
- Renderer → Render commands: issues commands
- Render commands → OpenGL backend: dispatches
- Sandbox client → Application loop: uses runtime