3 ms·
Flexibility and performance are the two driving forces behind the amount of template you need to get something on-screen. All the GPU API designs have gone the
by dahart 9y ago
Flexibility and performance are the two driving forces behind the amount of template you need to get something on-screen. All the GPU API designs have gone the same direction. WebGL actually takes less template code than, say, Vulkan or Direct3d.
Back when less template code was needed, we had fixed function pipelines that couldn't run shader code, and we were bound by all kinds of assumptions & limits. The APIs basically assumed you were doing perspective projection of textured triangles with Phong shading using point lights, for example. The APIs these days assume far less about what you want to do, and allow far more customization, at the expense of more setup function calls.
That said, getting started really is a total nightmare, and there's lots of room for acknowledging that most people only have one of several basic pipelines. There's no reason we couldn't have some easy default setups in addition to all the flexibility. API designers would probably argue that templates are not in their purview, but it sure would be nice if GPU interfaces took a step or two in the ease of use direction.
- pjmlp 9y agoGL is the worst of graphics APIs regarding newbie support. While every other 3D API has support for math, textures, models, shaders, fonts, basic scene graph, GL leaves to the developers to hunt for 3rd party libraries. Khronos tried to change that by creating an SDK page, listing endorsed libraries, but it has not been updated in ages.