-
Notifications
You must be signed in to change notification settings - Fork 55
Description
Hello! I'm quite the beginner w.r.t. Vulkan. In 2024 i did the old Vulkan tutorial at https://vulkan-tutorial.com/
It mentioned being outdated and pointed me to this tutorial.
In the introduction, the new tutorial says https://docs.vulkan.org/tutorial/latest/00_Introduction.html
Compared to the original tutorial, this version of the tutorial is teaching up-to-date concepts:
...
Modern C++ (20) with modules
So modules are "sold" as one reason to follow through with this tutorial.
When we get to the development environment chapter it says
Vulkan has support for C++ modules which became available with c++20. A large advantage of C++ modules is they give all the benefits of C++ without the overhead of long compile times. To do this, the .cppm file must be compiled for your target device. This tutorial demonstrates how to take advantage of C++ modules. However, to maximize compatibility across compilers and IDEs, the attachments template has C++20 module support disabled by default, but it is recommended to enable it if your toolchain supports it.
To enable the Vulkan C++20 module in the attachments template, configure CMake with: ...
So while it is disabled by default, I'm strongly encouraged to use modules. The problem is that module support is still very fractured and i had to spend many hours trying to get the module to compile. CMake forced me to update the project to C++23 standard. Upon asking the developers at Vulkan-Hpp two of them discouraged the usage of modules for beginners.
KhronosGroup/Vulkan-Hpp#2463 (comment)
KhronosGroup/Vulkan-Hpp#2463 (comment)
Edit: IntelliSense does not support modules either, so VSCode will throw many errors: microsoft/vscode-cpptools#6302
In order to not confuse beginners like me, i recommend to discourage people from using modules, until involved parties (e.g. vulkan-hpp, cmake) update their support for modules and make it an overall better experience. Or maybe put the recommendation to an optional section at the end?