#ifndef VULKAN_INSTANCE_HPP_
#define VULKAN_INSTANCE_HPP_

#include <vector>

#include <Utilities/Extern.hpp>

namespace Vk
{
    /**
     * @brief Represents a Vulkan instance.
     */
    class Instance
    {
    private:
        VkInstance m_instance;
        VkDebugUtilsMessengerEXT m_debugMessenger;

        #define DECL_EXT_FUNC(name) static PFN_##name name
        #include <Vk/Instance/InstanceExtFuncList.hpp>

        PFN_vkVoidFunction loadExtFunc(const char *name);
        void loadExtFuncs();

    public:
        static const std::vector<const char*> validationLayers;

        Instance(SDL_Window *window);
        Instance(const Instance &) = delete;
        ~Instance();

        /**
         * @brief Get the wrapped `VkInstance`.
         */
        VkInstance inner();

        /**
         * @brief Get the physical devices of this instance.
         */
        std::vector<VkPhysicalDevice> getPhysicalDevices();
    };
}

#endif