You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You will see many errors about unknown Vulkan types like so....
error: unknown type name 'VkFormat'
The reason for this is openxr_platform.h has a dependency on vulkan.h but does not #include it. It's generally considered best practice to #include or forward declare dependencies directly in the header that's using them so the burden isn't on the user to infer the proper order of includes.
There is some good info in here for anyone new to this concept https://stackoverflow.com/questions/2762568/c-c-include-header-file-order
I would like to understand Khronos's philosophy on this. Also I may just be incorrectly adding OpenXR as a dependency to my project. However looking though https://github.com/KhronosGroup/OpenXR-Tutorials and the hello_xr test it seems they also have a strict ordering of the includes.
The text was updated successfully, but these errors were encountered:
An issue (number 2336) has been filed to correspond to this issue in the internal Khronos GitLab (Khronos members only: KHR:openxr/openxr#2336 ), to facilitate working group processes.
This GitHub issue will continue to be the main site of discussion.
There seems to be a required order of
#includes
when usingopenxr_platform.h
.For example, this compiles:
This does not:
You will see many errors about unknown Vulkan types like so....
The reason for this is
openxr_platform.h
has a dependency onvulkan.h
but does not#include
it. It's generally considered best practice to#include
or forward declare dependencies directly in the header that's using them so the burden isn't on the user to infer the proper order of includes.There is some good info in here for anyone new to this concept https://stackoverflow.com/questions/2762568/c-c-include-header-file-order
I would like to understand Khronos's philosophy on this. Also I may just be incorrectly adding OpenXR as a dependency to my project. However looking though https://github.com/KhronosGroup/OpenXR-Tutorials and the
hello_xr
test it seems they also have a strict ordering of the includes.The text was updated successfully, but these errors were encountered: