OpenXRVk_Linux.h 900 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <AzCore/base.h>
  10. #include <AzCore/PlatformIncl.h>
  11. #include <AzCore/std/algorithm.h>
  12. #include <limits.h>
  13. #if defined(PAL_TRAIT_LINUX_WINDOW_MANAGER_XCB)
  14. #include <xcb/xcb.h> // needed for glad vulkan
  15. #endif
  16. #include <glad/vulkan.h>
  17. // Tell OpenXR what platform code we'll be using
  18. #if defined(PAL_TRAIT_LINUX_WINDOW_MANAGER_XCB)
  19. #define XR_USE_PLATFORM_XCB
  20. #elif defined(PAL_TRAIT_LINUX_WINDOW_MANAGER_WAYLAND)
  21. #define XR_USE_PLATFORM_WAYLAND
  22. #else
  23. #error "Linux Window Manager not recognized."
  24. #endif
  25. #define XR_USE_GRAPHICS_API_VULKAN
  26. #include <openxr/openxr.h>
  27. #include <openxr/openxr_platform.h>
  28. #include <openxr/openxr_reflection.h>