r/gameenginedevs • u/im_brick244 • 8h ago
After building a 3D engine in Raylib mostly with AI, I realized I wasn't actually learning graphics programming — so I started writing my own OpenGL 3.3 Core library from scratch in C++20
Hi everyone! I wanted to share a bit of my learning journey and get some feedback on my current project.
A while ago, I built a small 3D editor/engine using Raylib and ImGui (complete with gizmos, undo/redo, JSON scene serialization, and dynamic C++ script generation), but I relied heavily on AI to write most of it. When it was done, I realized that while it worked, I didn't truly understand how low-level rendering actually works under the hood — and that bothered me.
So I decided to take a step back and build openglforge-cpp completely on my own, from scratch, to genuinely learn modern C++20, CMake, and OpenGL 3.3 Core.
Since I had already experimented with code-gen in my previous project, the first thing I wrote by hand was a build-time CLI tool (shader_packer) hooked into CMake: it scans my .glsl folder on every build and packs all shaders into a generated_shaders.hpp header as inline constexpr const char* literals inside namespace glf::shaders.
What I've built so far on my own:
- RAII
Shaderwrapper with compilation/linking error checks - Automatic build-time
shader_packerCMake integration - Bundled GLAD (OpenGL 3.3 Core)
Next steps on my learning roadmap:
- RAII wrappers for VBO, EBO, and VAO
Texture2Dloader withstb_image- Framebuffer wrapper for off-screen rendering & ImGui viewports
GitHub repo: github.com/brick244/openglforge-cpp
Has anyone else gone through this "stepping back from high-level tools/AI to learn raw OpenGL" phase? Any advice on structuring VAO/VBO wrappers or improving my CMake setup is super welcome!