Re:Barebones WebGL in 75 lines of code
by Twisol on Wednesday July 08, 2020 @05:30PM
(#23774453)
Ah, so for "DSA-like helpers" you're suggesting additional helpers that will take care of binding the given object, making manipulations, and unbinding it?
[ Parent
| on HN ]
Yep. Though it's a lot trickier than just bind/unbind, e.g. if you have a VAO bound, you need to unbind the VAO before binding a vertex buffer, or else you might have overwritten the VAO's vertex buffer binding slot. And I've encountered many, many similar cases like that and edge cases, especially around framebuffer management.
The OpenGL programming model is unfortunate.