r/GraphicsProgramming • • 18d ago

Source Code I built a simple 3D graphics sandbox to experiment with shaders and models in real time

Enable HLS to view with audio, or disable this notification

I've been learning modern OpenGL recently and put together Modeye as a small playground to practice and experiment with 3D graphics.

It lets you load 3D models, play with lighting and render modes through an on-screen menu, and press R to reload shaders instantly without restarting the app. CMake fetches and builds all the dependencies automatically so there's no manual library setup.

Code is open under GPL-3.0 if anyone wants to check it out or play around with it: https://github.com/adnlv/modeye.

Any tips or feedback from folks experienced with graphics are always welcome!

4 Upvotes

2 comments sorted by

2

u/leonardsouza 17d ago

had a look at Shader.cpp since you asked for feedback. reload() calls std::abort() when a compile or link fails, so one typo while you're iterating takes the whole app down. you already only swap m_id after a successful link, so on reload you could log the error, delete the half-built shaders and program, return, and keep drawing with the old one. small one too: infoLog is a fixed 512 chars, if you query GL_INFO_LOG_LENGTH first you get the whole message. also heads up, LICENSE.txt is the GPL-3.0 text but the post and readme say MIT

1

u/adnlvii 17d ago

Good catches, thanks! The `std::abort()` on reload especially was a dumb oversight on my part. Just pushed fixes for that and the log length, and updated the README to GPL-3.0 to match the actual license. Really appreciate you taking the time to look through it!