30 explicit constexpr ContextAware(
Context const& context) :
33 constexpr ContextAware(ContextAware
const& r) =
default;
34 constexpr ContextAware(ContextAware&& r)
noexcept =
default;
35 virtual ~ContextAware() =
default;
37 ContextAware& operator=(ContextAware
const& r) =
delete;
38 ContextAware& operator=(ContextAware&& r)
noexcept =
delete;
40 [[nodiscard]]
constexpr Context const& getContext()
const {
return *this->g_context; }
41 inline void swapContext(
Context const& context)
44 this->g_context = &context;
47 virtual void destroy() = 0;
50 inline void verifyContext(ContextAware
const& r)
const
52 if (this->g_context != r.g_context)
54 throw fge::Exception(
"ContextAware objects assignment with different Context !");
59 Context const* g_context{
nullptr};
Vulkan context.
Definition C_context.hpp:70