-
Notifications
You must be signed in to change notification settings - Fork 51
Intellisense #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intellisense #83
Conversation
Included `vulkan_hpp_intellisense.h` across all attachment files to resolve C++20 module intellisense issues in IDEs.
# Conflicts: # attachments/00_base_code.cpp
|
Sadly doesn't do anything for me with VS2022. Still no intellisense. Only way I can get intellisense to work is remove the VulkanCppModule project and explicitly add the vulkan-hpp module to each project. Might be an option. |
|
Would love to do a PR myself, but my CMake knowledge simply isn't goot enough. I can't get it to properly work :/ |
…dule import - Deleted `vulkan_hpp_intellisense.h` across all attachment files. - Updated CMake to support conditional Vulkan module import using `USE_DIRECT_MODULE_IMPORT` toggle.
|
I tried a version with direct module linking, try turning that option on and see if it does the trick for you. If it works, maybe we make it a default build method. |
|
Sorry for the stupid question, but how do I actually set/enable that option? |
- Introduced `USE_DIRECT_MODULE_IMPORT` toggle in CMake to allow direct use of `vulkan.cppm`. - Provides an alternative for resolving Intellisense issues in VS2022 and other IDEs.
|
No question is stupid; if you're using the command line just pass it in to cmake like this: |
|
I also left comments in the cmake to detail how to set the option. |
|
Didn't seem to change anything for me on VS2022. Will try a few different things first and get back to you. |
…sion - Eliminated `USE_DIRECT_MODULE_IMPORT` toggle from CMake configuration. - Standardized conditional Vulkan module inclusion across all attachment files with `#ifdef __INTELLISENSE__` for improved IDE compatibility.
|
okay, this version I tried to directly tell intellisense that it needs to include vulkan.hpp directly. |
|
Yep, it still uses the module, only when INTELLISENSE is running (i.e. the static analysis step of "compiling" the source file) will it include the whole vulkan hpp file. Rest of the time it should be the module. Think I need to include vulkan_raii.hpp to get the right stuff instead of vulkan hpp by itself. I hate doing this, macros for a static analysis platform are silly, detract from understanding the code and don't precisely give what should exist from the compiler which is the whole reason static analysis exists. But I'll get off my soapbox as I'm sure Intellisense will eventually work with modules sooner or later. |
Updated all Vulkan-related files to replace `vulkan.hpp` with `vulkan_raii.hpp`, leveraging its enhanced RAII features for better resource handling and reduced manual management. Also updated CMake minimum version to 3.10 in tinygltf dependency.
…` import for improved IntelliSense compatibility across all attachment files.
|
Okay, all of the tutorial should now resolve correctly under intellisense. Lemme know if I missed anything. |
|
That did it. Intellisense is now properly working for me 👍🏻 |

Included
vulkan_hpp_intellisense.hacross all attachment files to resolve C++20 module intellisense issues in IDEs. This is a blind test to help fix: #75