OpenGL is set up to optimize for all those things, instead of optimizing for the learner/simple case.
It's definitely a valid approach, but it means for simple cases, you're copy & pasting a lot of boilerplate for performance, control, and a slew of other things you don't need.
You have to learn/paste a lot before you get a little reward.
For OpenGL you want control over state changes, uniforms and a slew of other things. Otherwise your performance/control will suffer significantly.
Look at the things I listed there, that's the bare minimum you need to do the above, and fitting that in one page is pretty impressive.