Program Listing for File instance.hpp¶
↰ Return to documentation for file (inexor/vulkan-renderer/wrapper/instance.hpp
)
#pragma once
#include <volk.h>
#include <cstdint>
#include <string>
#include <vector>
namespace inexor::vulkan_renderer::wrapper {
class Instance {
private:
VkInstance m_instance{VK_NULL_HANDLE};
static constexpr std::uint32_t REQUIRED_VK_API_VERSION{VK_API_VERSION_1_2};
public:
[[nodiscard]] static bool is_layer_supported(const std::string &layer_name);
[[nodiscard]] static bool is_extension_supported(const std::string &extension_name);
Instance(const std::string &application_name, const std::string &engine_name, std::uint32_t application_version,
std::uint32_t engine_version, bool enable_validation_layers, bool enable_renderdoc_layer,
const std::vector<std::string> &requested_instance_extensions,
const std::vector<std::string> &requested_instance_layers);
Instance(const std::string &application_name, const std::string &engine_name, std::uint32_t application_version,
std::uint32_t engine_version, bool enable_validation_layers, bool enable_renderdoc_layer);
Instance(const Instance &) = delete;
Instance(Instance &&) noexcept;
~Instance();
Instance &operator=(const Instance &) = delete;
Instance &operator=(Instance &&) = default;
[[nodiscard]] VkInstance instance() const {
return m_instance;
}
};
} // namespace inexor::vulkan_renderer::wrapper