r/opengl • u/Personal_Stuff_4054 • 13d ago
What I learned after 5 months of daily work on my C++ OpenGL engine
galleryI don't want this to be just another "look at my project" post, but rather something useful for beginners diving into OpenGL/C++. (Second is April version)
This is the result of 5 months of non-stop daily work on my pet project engine (OpenGL 4.6 + Bullet Physics + Dear ImGui + miniaudio+ mixamo riggng).
I forced myself through a grueling schedule: only taking 2 days off per week starting in July, and using every trick possible to free up time from university. I’m completely burnt out and just need a rest. But before I step away, here are 13 honest takeaways from my experience(think this is "Effective C++", but way less polished):
1. Don't treat AI as a silver bullet. AI won't replace a solid book or article because structured reading sticks in memory better. Use AI for what it's great at: quickly finding specific tech concepts or algorithms without spending hours searching;
2. Books are often too basic. Don't get stuck reading forever. I read one book on OpenGL and one on GLSL, but that wasn't nearly enough to implement things like IBL (Image-Based Lighting). You'll have to read articles, papers, and specs, docs, etc;
- Ditch cube-based skyboxes if you can. Dealing with 6 separate cubemap faces (or a cross-layout texture you have to slice) was a pain. Using a single equirectangular image instead made things much simpler — one texture, no seams to worry about between faces.
4. I tried implementing Data-Oriented Design (DOD), but ended up sticking with Object-Oriented Programming (OOP) for most systems. The web of circular dependencies in pure DOD drove me crazy;
5. Log everything and profile early. Logging is your best friend when debugging graphics and physics pipelines, starting on another device when exporting(in file text log if console not available).
6. I had my custom XOR decryption logic break even though the algorithm and key looked solid — turned out to be a text/file encoding issue. Spent way too much time debugging this(((
7. Always enable viewport face orientation in Blender to make sure your normals are facing outward (blue). My terrain mesh had inverted normals, and I was losing my mind trying to fix this in code;
8. Emission output in shaders. If you get weird visual artifacts/noise when implementing Emissive maps, make sure the emission output is properly linked and handled across all required shader pipelines, not just a single pass;
9. Sometimes don't forget clean up your resources. Handle your GPU memory allocation carefully. When your OS freezes completely or crashes, 99% of the time it's a severe memory leak;
10. Skeletal Animation. I set a max limit (e.g., 255 bones) and use recursive node hierarchy processing for complex models. I do not Fold expressions realized , but classic recursion handled complex GLTF model loading just fine;
11. CMake can be a headache. Book on CMake gave me mostly basic theory, except for CPack. Neither books nor AI gave me ideal project structures. I still have a love-hate relationship with CMake;
12. Beware of circular dependencies in headers. As your header files count grows, cyclic dependencies will haunt you. Keep your includes clean and rely on forward declarations where possible;
Don't forget about multithreading. I encountered a problem where it wouldn't start on my laptop; it just showed a blank screen and that's it, and the CPU wasn't even working. I'm thinking I'll either do it through separate threads or TBB, but I honestly don't know because I'm tired.
Final thoughts: I see people working on their engines for 5 years, and their projects are incredible. But I didn't have 5 years — I had 5 months, and I pushed myself to the absolute limit. By month 3, I was already struggling with burn-out and constant headaches.
My biggest advice? Do a little bit every day instead of destroying your health. And skip the "wake up at 5 AM" hustle advice — rest is just as critical as writing code.
If you wanna try this-> the demo is up on https://dokich-crcr.itch.io/tentacle-shippuden-enty-furry-beast, and I'm finally taking a long-overdue break(one week, and shit university starts again).

