3 ms·
I also am a graphics programmer and lead Vulkan developer at our company. I love Vulkan. I wouldn’t touch OpenGL with a 10 foot pole. But I also have years of d
by justsid 3y ago
I also am a graphics programmer and lead Vulkan developer at our company. I love Vulkan. I wouldn’t touch OpenGL with a 10 foot pole. But I also have years of domain expertise and OpenGL is hands down the better beginner choice.
The Vulkan hello triangle is terrible, it’s not at all production level code. Yeah, neither is the OpenGL one, but that’s much closer. Getting Vulkan right requires quite a bit of understanding of the underlying hardware. There’s very little to no hand holding, even with the validation layers in place it’s easy to screw up barriers, resource transitions and memory management.
Vulkan is fantastic for people with experience and a good grasp of the underlying concepts, like you and me. It’s awful for beginners who are new to graphics programmers.
- exDM69 3y agoI've used OpenGL for over 20 years and Vulkan since it came out. Neither of them is easy, but OpenGL's complexity and awkward stateful programming model is quite horrific. I've also watched and helped beginners struggling with both APIs on many internet forums over the years, and while getting that first triangle is easier in OpenGL, the curve gets a lot steeper right after that. Things like managing vertex array objects (VAO) and framebuffer objects (FBO) can be really confusing and they are kind of retrofitted to the API in the first place. I actually think that beginners shouldn't be using either of them and understand the basics of 3d graphics in a friendlier environment like Godot or Unity or something. Vulkan 1.3 makes graphics programming fun again. Now you don't need to build render passes and pipeline states up front, it's really easy to just set the pipeline states ad-hoc and fire off your draw calls. But yeah, judging by the downvotes my GP comment is receiving, seems like a lot of readers disagree. I'm not sure how many of them have actually used both APIs beyond beginner level, but I don't know anyone who has used both professionally and wants to go back to OpenGL with its awkward API and GLSL compiler bugs and whatnot.
- justsid 3y agoI'm mostly with you, and for the record have both used OpenGL and Vulkan professionally in shipped titles. I personally have no interest in going back to OpenGL. But I think the disconnect is that neither you nor me have any reason to fear Vulkan. I love how explicit Vulkan is and that the spec is in such depth, the only thing that comes close imho are the proprietary console APIs. I've also worked with Metal and DirectX and the documentation for those is just bad, you kinda have to know what you are doing already to understand the scraps of information you get and reason about the unspoken implementation details. That all being said though, the Vulkan spec and setup is just daunting for a beginner. And yeah, you can take a lot of shortcuts like not pre-building your PSOs or being lax with your barriers and memory handling. But I feel like you might as well just not use Vulkan in that case since you are throwing away some of its biggest advantages. Just AZDO it up and take advantage of the IHVs having spent decades beating on their OpenGL implementation (as long as we don't count the red team). A lot of Vulkan is just boilerplate and easy to-do and abstract away, but doing Vulkan right, that's the hard part in my opinion. Not to mention that it's really easy to build insidious gotchas into your code that are really hard to spot. Nvidia famously just doesn't care about image layouts, so if you just develop on Nvidia hardware it can be pretty easy to write code runs as if it was correct, but will explode on hardware that does care about image layouts. I have a drawer full of GPUs from different IHVs and generations just for day to day development. That's a really high barrier to entry.