2 ms·
> 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.
by nhaehnle 9y ago
> 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.
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.
- kuschku 9y ago> 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.
- nhaehnle 9y ago> Even in 4.5 there's many functions that have no direct state version yet Which ones are you missing in particular?