In 4.x they added DSA[1], which lets you avoid the global state a lot of the time. There's still some, but much less.
I do agree, though, that opengl is somewhat a mess, and vulkan really overwhelming.
1. https://www.khronos.org/opengl/wiki/Direct_State_Access