Hacker News new | ask | show | jobs
by fire_lake 739 days ago
Could someone write an OpenGL to Vulkan layer as a library so that we can target Vulkan but at a higher level of abstraction?

Then gradually we can replace that library with routines optimised for the use case?

2 comments

There is the Zink project[1]. It is an OGL to Vulkan translation layer.

[1]https://docs.mesa3d.org/drivers/zink.html

But it's part of Mesa, it's not something you can drop into an app written against OpenGL to translate the calls to Vulkan right?
You absolutely can. It can even build and run on Windows too. I’ve used it to play some modded Minecraft builds where Zink outperformed the native OpenGL2 drivers on my machine. Mainly because the native OpenGL2 driver was terrible at the time for my hardware but it’s 100% a thing you can do.

Some games are even shipping on it [1]

[1] https://www.gamingonlinux.com/2023/02/x-plane-12-now-uses-th...

Where do you think <GL/gl.h> comes from?
ANGLE is the (certified compliant) OpenGL ES -> Vulkan/Metal/Direct3D/etc translation layer used by your friendly neighborhood web browser. There are docs about how the Vulkan translation layer works: https://chromium.googlesource.com/angle/angle/+/HEAD/src/lib...