This video documents Cherno's extensive effort to update the ImGui library within his Hazel Game Engine, a process initiated after 2.5 years without updates. The stream begins with frustrating computer crashes linked to Nvidia drivers, which are resolved by updating to a game-ready driver. The core of the video then shifts to the complex and often "struggling" task of forking, removing, and re-adding the ImGui submodule to Hazel, navigating Git complexities and significant breaking API changes in the new ImGui version. Despite numerous compilation errors and deprecated functions, Cherno successfully integrates the updated ImGui, including a custom stack layout. The process reveals new ImGui debugging features that aid in identifying previously unseen UI ID conflicts. Cherno also discusses his philosophy behind building a custom game engine and shares insights from his time at EA Mobile Games.
Updating ImGui in Hazel Engine: A Deep Dive into Development Challenges
0:00 Technical Issues & Setup: Cherno introduces the stream, apologizing for a previous cancellation due to illness. He discusses 1440p streaming availability and the current state of ImGui rendering in Hazel, noting a major issue where his computer crashes when running the ImGui Vulkan example, suspecting Nvidia driver problems.
30:00 Driver Problems & Solutions: To address the recurring crashes and visual flickering, Cherno updates his Nvidia drivers from a studio version to a game-ready one. This successfully resolves the crashing issues. He also briefly notes a memory leak in Hazel.
45:00 ImGui Upgrade Project Begins: Cherno decides to upgrade ImGui, as his current fork is over 2.5 years old (February 2023). He plans to create a new fork of the ImGui docking branch under the "studio-cherno" GitHub organization and replace the old submodule, anticipating a complex Git process.
1:00:00 Submodule Struggle: The process of removing and re-adding the Git submodule proves unexpectedly difficult, requiring multiple attempts and manual commands due to Git's caching and configuration. Cherno eventually succeeds in updating the ImGui submodule to the latest version (June 2025).
1:15:00 Building & Integration: With the submodule updated, Cherno modifies the premake script for the new ImGui version and begins compilation. He also integrates a "stack layout" implementation from a community pull request (#846) into his ImGui fork.
1:40:00 Breaking Changes Marathon: The upgrade necessitates a massive manual migration effort due to numerous renamed and removed ImGui functions (e.g., FocusedByTabbing, CaptureMouseFromApp renamed to SetNextFrameWantCaptureMouse). API changes, such as ItemHoverable requiring additional parameters, further complicate the process.
2:30:04 API Migration Challenges: More API changes are encountered, including Key system overhaul (ImGuiKey_ enum changes), Tree node function renames (TreeNodeBehaviorIsOpen to TreeUpdateNextOpen), and navigation system adjustments.
2:50:00 Success: After resolving final compilation errors, Cherno successfully builds the Hazel editor with the updated ImGui, marking a significant milestone.
3:10:05 Technical Challenges & Debugging: Cherno tackles linking errors and other Visual Studio compilation issues, often requiring clean builds. He discovers revolutionary new ImGui debugging features, such as an item picker tool (Ctrl+click UI elements to break into call stack) and automatic reporting of programming errors like conflicting IDs, which help in identifying pre-existing issues in Hazel's UI.
3:20:02 Game Engine Philosophy Discussion: Cherno elaborates on his motivation for creating a custom game engine, emphasizing his passion for engine technology and experience at EA. He discusses his language choices (C++ for engine core, C# for scripting, similar to Unity) and his goal of creating a substantial game, not just the engine. He shares insights from scripting complex UIs in Lua for EA's mobile game "Need for Speed No Limits," highlighting performance challenges.
3:47:08 Current State & Future Plans: The ImGui upgrade is largely successful, with most of the editor UI working. Viewport rendering is currently disabled as the old Vulkan renderer needs to be ported to the new NVHI renderer. Cherno plans to continue debugging remaining UI issues and resume streaming the next day.