I'm developping a game engine using vulkan and glfw. As indicated here, with glfw there's a bunch of macros to include OpenGL/OpenGL ES/Vulkan. Since it is now included in the vulkan sdk, how can I setup glfw to include vulkan-hpp. Do I just need to put GLFW_INCLUDE_NONE and add #include <vulkan/vulkan.hpp> or do I need to implement something else?
1
votes
1 Answers
1
votes
If we take a look at GLFW.h, it just includes vulkan.h only if the GLFW_INCLUDE_VULKAN macro is defined. So if you want to include the vulkan.hpp file, just undefine the GLFW_INCLUDE_VULKAN macro and include the file explicitly.
Why?
GLFW is a C library. vulkan.hpp file contains C++ stuff inside so there could be compatibility issues. That's why GLFW only includes vulkan.h and not vulkan.hpp.