diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-09-14 07:31:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-14 07:31:54 +0200 |
commit | b1e54ef20b1f8bd6c89978b08ffd47d062554cd8 (patch) | |
tree | aeff107d8097f7677a44373a8373b92bb09d670e /thirdparty/openxr/src/loader/manifest_file.hpp | |
parent | 2d9583fa3bf2426dabbdd9e9d9b8fd9725b9436c (diff) | |
parent | 70d3935bf951c3e081faca02dd56d4f53d0c0a4f (diff) |
Merge pull request #65766 from BastiaanOlij/openxr_1_0_25
Update OpenXR to 1.0.25
Diffstat (limited to 'thirdparty/openxr/src/loader/manifest_file.hpp')
-rw-r--r-- | thirdparty/openxr/src/loader/manifest_file.hpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/thirdparty/openxr/src/loader/manifest_file.hpp b/thirdparty/openxr/src/loader/manifest_file.hpp index 0d04886d84..de0aab65c2 100644 --- a/thirdparty/openxr/src/loader/manifest_file.hpp +++ b/thirdparty/openxr/src/loader/manifest_file.hpp @@ -14,6 +14,7 @@ #include <memory> #include <string> #include <vector> +#include <iosfwd> #include <unordered_map> namespace Json { @@ -79,6 +80,8 @@ class RuntimeManifestFile : public ManifestFile { std::vector<std::unique_ptr<RuntimeManifestFile>> &manifest_files); }; +using LibraryLocator = bool (*)(const std::string &json_filename, const std::string &library_path, std::string &out_combined_path); + // ApiLayerManifestFile class - // Responsible for finding and parsing API Layer-specific manifest files. class ApiLayerManifestFile : public ManifestFile { @@ -93,8 +96,19 @@ class ApiLayerManifestFile : public ManifestFile { ApiLayerManifestFile(ManifestFileType type, const std::string &filename, const std::string &layer_name, const std::string &description, const JsonVersion &api_version, const uint32_t &implementation_version, const std::string &library_path); + + static void CreateIfValid(ManifestFileType type, const std::string &filename, std::istream &json_stream, + LibraryLocator locate_library, std::vector<std::unique_ptr<ApiLayerManifestFile>> &manifest_files); static void CreateIfValid(ManifestFileType type, const std::string &filename, std::vector<std::unique_ptr<ApiLayerManifestFile>> &manifest_files); + /// @return false if we could not find the library. + static bool LocateLibraryRelativeToJson(const std::string &json_filename, const std::string &library_path, + std::string &out_combined_path); +#ifdef XR_USE_PLATFORM_ANDROID + static bool LocateLibraryInAssets(const std::string &json_filename, const std::string &library_path, + std::string &out_combined_path); + static void AddManifestFilesAndroid(ManifestFileType type, std::vector<std::unique_ptr<ApiLayerManifestFile>> &manifest_files); +#endif JsonVersion _api_version; std::string _layer_name; |