Re:I Am Graphics and So Can You
by trelliscoded on Wednesday July 12, 2017 @04:45PM
(#14756505)
The thing about Vulkan is it moves a lot of the boilerplate out of the driver and into your app. That way you can just tell the hardware what to do (and not to do) without the driver trying to read your mind via API calls and optimizing that way.
Re:I Am Graphics and So Can You
by thehardsphere on Wednesday July 12, 2017 @04:24PM
(#14756303)
> Graphics programming terrified me for the longest time because people acted like it was dark magic and hard
Now that I am becoming old, I have started to realize that anyone who creates a feeling of dark magic around almost any programming subject probably doesn't understand the subject very well themselves and has some sort of self-confidence issue that makes them portray whatever it is that way to people who know less than they do.
I think "dark magic" in a lot of these cases is just a lot of domain specific knowledge to get a general understanding of the topic. I think the Internet has really helped. With a "dark magic" topic like graphics, you can get started with a little bit of domain knowledge and the right template code (which wasn't as easily available before the Internet). Without the right template code, you're doing a lot of yak shaving and having to learn a whole lot at once just to get a triangle on the screen.
It is a lot to learn at once, but no more than web dev where you are learning html and databases and HTTP and god knows what else at once. And like you said once you grok it, it's pretty easy.
Graphics programming terrified me for the longest time because people acted like it was dark magic and hard. Figuring this stuff out slowly but surely it shocks me how little there is to it and I wish someone would have told me sooner.
I've gotten rendering a cube down to an art (gotta start somewhere). You're talking ~100 lines of JS and double that of C++ but no more than that in any decent language. And that's a cube (or multiple) and a basic camera.
A library like regl shows how simple this stuff can get without lots of boilerplate.
https://github.com/regl-project/regl/blob/gh-pages/example/b...
Boom a triangle in 40 lines, but the underlying process of vertices, buffers, shaders, etc is apparent. Cool stuff.
Those asking about Vulkan - Vulkan only increases the boilerplate by design.