<p>Basic Vulkan availability can be checked by the presence of the loader dynamic library. This will reside in a standard place where you can load it with <code>dlopen</code> or <code>LoadLibrary</code>. </p>

<p>If it fails to load then vulkan is not installed. If it does load then you can get the vkGetInstanceProcAddr function pointer from it with <code>dlsym</code>or <code>GetProcAddress</code>. After that you can query the devices as normal and decide whether or not it's sufficient to support your app.</p>

CC BY-SA 3.0
2016-06-17T19:46:24.013Z
2016-06-17T19:46:24.013Z
ratchet freak
<p>I'm building an engine, which has Vulkan for its primary rendering engine. But to have at least some backwards compatibility with devices that don't have drivers for it (mainly mobile) I want to implement an OpenGL fallback. Now, how do I check what API's are available in the current system?</p>

<p>I want to check if Vulkan support exists, if not then if OpenGL support exists and if not that then crash.</p>

<opengl><c++><vulkan>
How to check which API's are available on a given machine?
Aaro
# How to check which API's are available on a given machine?

(Asked by: username_0 on 2016-06-17)

I'm building an engine, which has Vulkan for its primary rendering engine. But to have at least some backwards compatibility with devices that don't have drivers for it (mainly mobile) I want to implement an OpenGL fallback. Now, how do I check what API's are available in the current system?

I want to check if Vulkan support exists, if not then if OpenGL support exists and if not that then crash.

**Tags:** opengl, c++, vulkan


---

## 1 answers

### Answer by username_1 on 2016-06-17. Score: 3 | Accepted answer

Basic Vulkan availability can be checked by the presence of the loader dynamic library. This will reside in a standard place where you can load it with `dlopen` or `LoadLibrary`.

If it fails to load then vulkan is not installed. If it does load then you can get the vkGetInstanceProcAddr function pointer from it with `dlsym`or `GetProcAddress`. After that you can query the devices as normal and decide whether or not it's sufficient to support your app.


---

