LearnOpenGL
OpenGL based renderer and editor app
Introduction
This project is a custom-built OpenGL renderer and level editor application developed to explore and understand the fundamentals of real-time computer graphics. Written in C++ and powered by the OpenGL API, it serves as a hands-on learning experience focused on core rendering concepts, graphics pipeline mechanics, and scene management. To make the process more interactive and practical, the project also features a built-in level editor, allowing for the creation, modification, and visualization of scenes in real time. This combination of renderer and editor provides a comprehensive environment for both experimenting with graphics techniques and designing visual content dynamically.
Learning Materials
This project was built with the help of several foundational resources in graphics programming and engine development. Key references include TheCherno's Game Engine video series and the accompanying Hazel engine, which provided valuable insights into architecture and workflow. The comprehensive tutorials from learnopengl.com served as a primary guide for understanding the OpenGL pipeline and rendering techniques. Additionally, the OpenGL Programming Guide (commonly known as the "Red Book") offered in-depth explanations of the API's inner workings. Practical shader techniques and inspiration were also drawn from Shadertoy examples. Beyond these, countless other articles, documentation, and open-source projects contributed to the learning process.
Build Tools and Project Structure
Instead of relying on CMake, this project utilizes Premake, a lightweight and flexible build configuration tool that simplifies project setup across platforms. The application is organized into two main components. The first, LearnOpenGL, serves as the core engine module. It encapsulates the foundational systems such as rendering, input handling, an Entity-Component-System (ECS) architecture, resource management, and integration with the ImGui library for creating real-time UI panels. This modular design helps keep the engine logic organized and reusable across different parts of the application.

User Interface
The editor’s user interface is built using ImGui, leveraging its docking system to create a modular, flexible workspace similar to game engines like Unity. The layout consists of several key panels, such as the Render panel, an Asset Browser for navigating project resources, an Outliner to display the scene entities, and an Entity/Asset Inspector where users can view and edit properties specific to selected entities or assets. Additionally, a Framebuffer view panel is available for real-time debugging and visual feedback, making it easier to inspect rendering output directly within the editor environment.

Lighting
The renderer supports all three fundamental types of lighting used in real-time graphics: pointlights, spotlights, and a directional light. Each light type is implemented with basic shading and includes support for shadow mapping, spotlights and the single directional light share a high-resolution depth map for their shadows, while for pointlights, the renderer uses a dedicated cubemap shadow mapping technique to account for their omnidirectional nature.

Shadow Map Atlas
To efficiently manage multiple shadow-casting lights, the renderer implements a shadow map atlas—a technique inspired by the rendering system used in DOOM (2016) with the idTech 6 engine. This approach was studied in detail through Adrian Courrèges’ case study, which provided key insights into how multiple shadow maps can be packed into a single large. For the actual atlas generation and packing, the project uses Nikita Lisitsa's texture packing algorithm, which offers a practical and robust solution for placing varying-sized shadow maps within a single texture. This setup enables better GPU resource utilization and lays the groundwork for scalable, multi-light shadow rendering.

Entity Component System (ECS)
After extensive research and experimentation, the ECS implementation in this project is based on the approach detailed in Austin Morlan’s ECS article. This relatively straightforward design focuses on separating data (components) from behavior (systems), offering a clean and modular way to manage entities in a scene. While it’s not the most advanced or optimized ECS out there, it was instrumental in understanding the core principles behind ECS architectures, such as data-oriented design, cache efficiency, and decoupling logic. Building this system from the ground up provided valuable insights into both the benefits and the challenges of such a system.

Project Challenges
As a learning-focused, hobby project, one of the biggest challenges has been maintaining motivation and using limited free time effectively. The primary goal was to explore the basics of computer graphics through OpenGL, but as the project grew in complexity—with features like world editing, loading/saving, screen space reflections, and atmospheric sky simulation—the lack of a solid foundational software architecture began to surface. Over time, the codebase became more difficult to manage and extend, especially as both rendering and editor functionality evolved in parallel. As a result, the project is currently on hold, with future efforts likely to focus more narrowly on rendering techniques rather than building a full-fledged editor. This shift allows for deeper exploration of visual fidelity and performance, without the overhead of maintaining complex UI and scene management systems.