Vulkan feels more like a breath of fresh air in comparison, and its still higher level than the APIs we get on consoles.
I find it much simpler to architect engines with Vulkan in mind than OpenGL.
Nowadays people are more comfortable with having objects that represent something, and executing operations on them, than having to bind an object to a global variable, execute a global procedure, and unbinding it.
I don't agree that people like to bind an object to a global variable, execute a global procedure, and unbind it. Does that sound like the API of anyone's dreams? The binding and unbinding sounds like pure overhead to me.
I understand that very high performance and easy API may not be achievable, but seriously, the modern graphics APIs are hard to love.
Isn't that how OpenGL works?
glColor3f( 1,0,0 );
glBegin( GL_POLYGON );
glVertex3f( 0,0,0 );
glVertex3f( 1,1,0 );
glVertex3f( 1,2,0 );
glEnd();
The current polygonal environment is a global state variable.
The current vertex is a globally set variable (as you'll notice once you try to set textures and colors, becayse glVertex3f just sets a global variable), etc.
Try throwing two threads at this, you'll get hilarious results, and there's no way to propeely fix this.
And OpenGL 1.0 to 1.5 and then 2.0 made it even worse.
You allocate a buffer, fine.
But to write to it, you first bind the buffer to a global variable, then use a call writing to a global variable.
Bad example. glVertex3f is the one function (among the various glColor, glMultiTexCoord etc.) which doesn't set global state. It actually triggers a vertex to be sent (which takes its attributes from the global state you mentioned).
But all this is pretty moot, because it's not how OpenGL has been meant to be used in ages. Use the core profile, where these functions don't even exist any more.
> You allocate a buffer, fine.
> But to write to it, you first bind the buffer to a global variable, then use a call writing to a global variable.
Also outdated, though not by quite as much. Direct state access (DSA) has been a thing for a pretty long time, now.
If it just worked for everything...
Even in 4.5 there's many functions that have no direct state version yet, and many others were only introduced in 4.4 and 4.5 (meaning it won't be really compatible anywhere).
For me, the #1 advantage of Vulkan is having DSA for everything, just working.
Which ones are you missing in particular?
In contrast, older OpenGL with the global state is the pure horror, and even 4.5 has lots of that still.
Graphics work is tricky, you need everything to line up just right or stuff renders in ways that don't lend well to understanding what went wrong. When you put a framework abstraction in between that it can be really difficult to find out exactly what went wrong.
Sure, but Vulkan really feels like another level of complexity. OpenGL is simple in comparison.