So I've decided that as an exercise to learn more about engine development that I would develop a platform-independent scene graph with the ability to have renderers for multiple rendering systems. I have heard much praise from OpenSceneGraph, so I decided to have a look at their code for ideas and inspiration.
What I found instead was a sea of bad code. In particular my gripes were:
1) Tons of protected member state. This opens a HUGE potential for problems later on, and would require massive refactoring if the underlying base classes ever changed.
2) Every object extends from a "base object" (similar to Java), and supports only manual reference counting. I once considered a system like this, and came to realize (with the help of others) it causes nothing but problems in the long run. Why OSG?
3) Exposing getters and setters for properties that have no business being exposed. Literally every bit of internal state can be modified through a setter, and in some cases it's extremely inappropriate. The idea of private state is practically nonexistent in OSG.
4) I was expecting an abstraction of OpenGL, and found only a thin wrapper. The idea that OSG could ever support another rendering library is basically impossible at this point.
Now this isn't to say I didn't take away anything positive from my dive into their code. In fact there were several things I liked. But overall, wow what a disappointment that was. Is this the feeling most people get when they look at OSG's code, or am I just being too critical?