-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- This holds the XR instance, debug messenger & system ID - Disabled -Wmissing-field-initializers for GCC & Clang, which is triggered for some OpenXR types instantiations
- Loading branch information
Showing
6 changed files
with
435 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#pragma once | ||
|
||
#ifndef RAZ_XRCONTEXT_HPP | ||
#define RAZ_XRCONTEXT_HPP | ||
|
||
#include <cstdint> | ||
#include <string> | ||
#include <vector> | ||
|
||
struct XrInstance_T; | ||
struct XrDebugUtilsMessengerEXT_T; | ||
|
||
namespace Raz { | ||
|
||
class XrContext { | ||
public: | ||
explicit XrContext(const std::string& appName); | ||
|
||
~XrContext(); | ||
|
||
private: | ||
using XrInstance = XrInstance_T*; | ||
using XrDebugUtilsMessengerEXT = XrDebugUtilsMessengerEXT_T*; | ||
|
||
void recoverApiLayers(); | ||
void recoverExtensions(); | ||
void createInstance(const std::string& appName); | ||
void destroyInstance(); | ||
void createDebugMessenger(); | ||
void destroyDebugMessenger(); | ||
|
||
std::vector<std::string> m_apiLayers; | ||
std::vector<const char*> m_activeApiLayers; | ||
std::vector<std::string> m_extensions; | ||
std::vector<const char*> m_activeExtensions; | ||
|
||
XrInstance m_instance {}; | ||
XrDebugUtilsMessengerEXT m_debugMsgr {}; | ||
uint64_t m_systemId {}; | ||
}; | ||
|
||
} // namespace Raz | ||
|
||
#endif // RAZ_XRCONTEXT_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.