Introduction
OpenGLPractice is my earliest project in developing a custom rendering engine. The main goal of this project was to explore the fundamental principles of graphics rendering using OpenGL.

The project was created two years ago as part of my self-education in graphics programming and was heavily influenced by the book “C++ Game Animation Programming”. In 2024, I decided to upload it to GitHub to document my progress and potentially refine some of its aspects.
Project Structure
Core Modules:
- Buffers/ – Manages OpenGL buffers such as Vertex Buffer Objects (VBOs), Element Buffer Objects (EBOs), and Vertex Array Objects (VAOs).
- Camera/ – Implements a camera system that supports first-person and third-person movement in a 3D environment.
- Logger/ – A simple logging system to track events, errors, and debugging information.
- Model/ – Handles 3D model loading, transformations, and rendering.
- Renderers/ – Contains rendering pipelines responsible for drawing different objects to the screen.
- Shaders/ – Manages vertex, fragment, and other types of shaders, along with their compilation and linking.
- Textures/ – Handles loading, binding, and managing texture data for objects.
- Timer/ – Implements a frame timer for controlling game loop speed and animation timing.
- UserInterface/ – Integrates Dear ImGui, allowing debugging tools, UI overlays, and live tweaking of rendering parameters.
- Window/ – Handles window creation, resizing, and event management, using GLFW.
Build System & Dependencies:
- cmake/ – Stores CMake configuration files for easy cross-platform builds.
- third_party/ – Contains external dependencies, including:
- GLFW – Handles windowing, input, and OpenGL context creation.
- GLAD – A modern OpenGL function loader, replacing GLEW.
- GLM – Provides mathematics utilities for 3D transformations and physics.
- stb_image – A lightweight image loader for handling textures.
- KHR (Khronos Group Extensions) – Manages OpenGL extension handling and ensures compatibility with modern graphics cards.
- Dear ImGui – A powerful UI framework for real-time debugging and visualization of rendering parameters.
Main Files
- .gitignore – Specifies which files should be ignored in version control.
- CMakeLists.txt – Defines how the project is built using CMake.
- CMakePresets.json – Stores preset configurations for building the project with different compilers.
- README.md – Contains project documentation and setup instructions.
- main.cpp – The entry point of the application, initializing OpenGL, shaders, rendering pipeline, and main loop.
Technologies Used
The project leverages the following technologies:
- C++ – Core programming language.
- OpenGL – Graphics API for rendering.
- GLFW – Handles windowing, input, and OpenGL context management.
- GLAD – Ensures compatibility with modern OpenGL versions.
- KHR Extensions – Supports cross-vendor OpenGL features.
- GLM – Provides linear algebra utilities for 3D transformations.
- stb_image – Handles loading of texture images.
- Dear ImGui – Provides a real-time debugging UI.
- CMake – Manages the project’s build system.
Leave a comment