GLbasic is a structured OpenGL rendering framework built from scratch to understand and implement a clean graphics pipeline architecture using modern OpenGL (Core Profile).
This project is not a tutorial dump — it is an attempt to design a modular, scalable rendering system with clear separation of responsibilities.
- Custom Buffer abstraction (VBO/EBO)
- Vertex Array Object (VAO) management
- Mesh system with indexed & non-indexed rendering
- Minimal Renderer abstraction
- Window and input handling using GLFW
- Clean separation between data, state, and execution
The rendering pipeline is structured into independent components:
CPU Data → Buffer → VertexArray → Mesh → Renderer → GPU
| Component | Responsibility |
|---|---|
| Buffer | Manages GPU memory (VBO/EBO) |
| VertexArray | Stores attribute layout and buffer bindings |
| Mesh | Represents drawable geometry |
| Renderer | Executes draw calls |
| Shader | Compiles and manages GPU programs |
| Window | Handles OpenGL context and input |
-
Separation of Concerns
- Geometry (Mesh) is independent of rendering logic (Renderer)
- Shader is not owned by Mesh
-
Minimal Abstraction
- No over-engineering in V1
- Direct mapping to OpenGL concepts
-
Deterministic Behavior
- No hidden state changes
- Explicit control over bindings
-
Extensibility
- Designed to evolve into a full engine (V2+)
GLbasic/
│
├── src/
│ ├── graphic/
│ │ ├── Buffer.*
│ │ ├── VertexArray.*
│ │ ├── Mesh.*
│ │ ├── Renderer.*
│ │ └── Shader.*
│ │
│ ├── window/
│ │ └── Window.*
│ │
│ └── main.cpp
│
├── shaders/
├── libs/
├── CMakeLists.txt
└── .gitignore
- C++17 or later
- OpenGL 3.3+
- GLFW
- GLAD
- CMake
git clone https://github.com/KrishMaheshwariDev/LearningOpenGL.git
cd GLbasic
mkdir build
cd build
cmake ..
cmake --build ../GLbasic(Windows)
GLbasic.exe- Render triangle (non-indexed)
- Render quad using EBO (indexed rendering)
- Basic shader pipeline
- No camera system
- No transformation matrices (MVP)
- No material/texture system
- Single VBO per mesh
- No instancing or batching
- Basic pipeline
- Clean abstractions
- Working rendering loop
- Layout abstraction system
- Multiple buffer support
- Material & texture system
- MVP transformations
- Scene graph
- Camera system
- Lighting
- Instancing
- Engine-level architecture
Full documentation will be available as a static website:
- Architecture deep dive
- Design decisions
- Internal data flow
- Usage guide
This project is built to:
- Understand OpenGL beyond tutorials
- Design scalable rendering architecture
- Practice low-level system design in C++
This is a personal learning + system design project. Contributions are welcome but should align with the architectural direction.
TBD
If you are reading this expecting a ready-made engine, this is not it.
If you want to understand how a rendering pipeline is structured from scratch, this is exactly that.