// ============================================= // Aster: context.h // Copyright (c) 2020-2024 Anish Bhobe // ============================================= #pragma once #include "global.h" /** * @class Context * * @brief Vulkan context to handle device initialization logic. * * Handles the required hardware interactions. */ struct Context final { // Members vk::Instance m_Instance = nullptr; vk::DebugUtilsMessengerEXT m_DebugMessenger = nullptr; // Ctor/Dtor Context(cstr appName, Version version, bool enableValidation = ENABLE_LAYER_MESSAGES_DEFAULT_VALUE); ~Context(); // Move Context(Context &&other) noexcept; Context &operator=(Context &&other) noexcept; #if !defined(ASTER_NDEBUG) constexpr static bool ENABLE_LAYER_MESSAGES_DEFAULT_VALUE = true; #else constexpr static bool ENABLE_LAYER_MESSAGES_DEFAULT_VALUE = false; #endif DISALLOW_COPY_AND_ASSIGN(Context); };