r/GraphicsProgramming • • Feb 13 '23

OpenGL vs Vulkan - That One Game Dev

Based on my latest article I wanted to ask which one would you choose over the other for your next project?

Feb 16 '23
83 OpenGL
169 Vulkan
37 None (Other)
3 Upvotes

9 comments sorted by

5

u/Ipotrick Feb 13 '23

Opengl tooling support is actually regressing, esp in tooling. nsight, and rga already have 0 support for any advanced features on opengl. Renderdoc also only supports it for legacy reasons and to keep very old device debug working.

Anything modern should definetly not ue opengl. It is very much dying and outdated by now. But also dont just use raw vulkan. There is a large infrrastructure with vma and alike.

2

u/Object_71 Feb 13 '23

True that. But on the other hand OpenGL ES is still relevant for some devices. As I mention in my blog there is WebGL which is very relevant until WebGPU becomes mainstream. So people must learn OpenGL for those cases - hence not dead.

1

u/nanoSpawn Feb 14 '23

For WebGL you can use a library like Three.js and it skips you the raw OpenGL aspects of it.

4

u/HabemusAdDomino Feb 14 '23

Super silly question, really.

2

u/Wittyname_McDingus Feb 20 '23

I, too, can ask ChatGPT "OpenGL versus Vulkan" and "Is OpenGL dead?" and get almost exactly these same answers. I even asked it "write a conclusion for an article comparing OpenGL and Vulkan based on the information above" and got almost your conclusion verbatim lmao.

Please don't spread more content-free AI-generated articles next time.

2

u/jmXDP Feb 13 '23

9 years ago I launched our product on OpenGL. In the following years it went on to support not only Windows, but Mac, Apple TV, iOS and Android all with minimal porting pain - I'm grateful for that. However, there was much pain in driver compatibility issues, especially on older windows and mac drivers (mostly laptops). For that reason, plus decaying tools support, we've started our pivot away from OpenGL.

We've now moved all our apple devices to Metal (more than 50% of our users!), and are now measuring how feasible it is to ship Vulcan on windows+android. Turns out those older laptops are still lacking a bit of support here, but the numbers are diminishing to the point it looks reasonable to go vulcan (backup plan is DX on windows, GLES on Android).

If I were to start a new cross platform project I think I'd choose dual APIs (metal+vulcan).

1

u/mb862 Feb 14 '23

We've largely made the same choice. I respect (and have contributed to) MoltenVK but we're in a very performance-sensitive industry (not gaming) so need very tight control. MoltenVK aims to be as performant as possible but there are places where they must sacrifice performance for correctness, because Metal and Vulkan don't solve every problem in the exact same way. We wrap Metal and OpenGL (plus CUDA and OpenCL for compute) in our own RHI based on a spec we define based on our needs. For example, rather than emulate vertex+tess control shaders for tessellation as MoltenVK does (and incurring the performance cost of switching encoders and unnecessary load/stores of render targets), we instead auto-generate vertex+tess control GLSL shaders based on vertex layout. This happens at pipeline creation time, allowing us to maximize performance of tessellation at render time for both backends simultaneously. We'll definitely be adding a Vulkan backend for Linux, but likely we'll be doing Direct3D 12 for Windows due to being much more battle tested in the industry.

1

u/Ty_Rymer Feb 13 '23

I need a "both" option

1

u/pjmlp Feb 14 '23

Middleware + native platform APIs.