Hacker News new | ask | show | jobs
by moonchild 2103 days ago
That sounds much worse. That's still global state, just encapsulated global state. Any time you say glBindWhatever(), you're assigning global state. And the state obj should be an opaque handle so you don't end up with stale pointers. Should be glEnable(state, GL_BLEND); glDepthTest(state, GL_LEQUAL);.