Former-commit-id: 52226793d7a087dfe0523315d3303934daffee49 [formerly 9de1c04df6b371f861a2eee8bba38902ee5041cd] [formerly ecd3099df5498722f6390447f40bd3907b8e40c4 [formerly 3076df585565fc9759ab3e718270f2e5ef620840]] Former-commit-id: 92d52f967d0b088d1271afef26069e08cacd6b0f [formerly 5fe27e2ead104278951c772c2121a7b677f88d4d] Former-commit-id: fb6c2456d8edd3ec022d5d953f79fecdd4f2b8f4
56 lines
1.6 KiB
C++
56 lines
1.6 KiB
C++
// Copyright (C) 2016 Jérôme Leclercq
|
|
// This file is part of the "Nazara Engine - Vulkan Renderer"
|
|
// For conditions of distribution and use, see copyright notice in Config.hpp
|
|
|
|
#pragma once
|
|
|
|
#ifndef NAZARA_VULKAN_HPP
|
|
#define NAZARA_VULKAN_HPP
|
|
|
|
#include <Nazara/Prerequesites.hpp>
|
|
#include <Nazara/Core/Initializer.hpp>
|
|
#include <Nazara/Core/ParameterList.hpp>
|
|
#include <Nazara/VulkanRenderer/Config.hpp>
|
|
#include <Nazara/VulkanRenderer/VkDevice.hpp>
|
|
#include <Nazara/VulkanRenderer/VkInstance.hpp>
|
|
#include <Nazara/VulkanRenderer/VkPhysicalDevice.hpp>
|
|
#include <Nazara/VulkanRenderer/VkSurface.hpp>
|
|
#include <list>
|
|
#include <vector>
|
|
|
|
namespace Nz
|
|
{
|
|
class NAZARA_VULKANRENDERER_API Vulkan
|
|
{
|
|
public:
|
|
Vulkan() = delete;
|
|
~Vulkan() = delete;
|
|
|
|
static Vk::DeviceHandle CreateDevice(VkPhysicalDevice gpu, const Vk::Surface& surface, UInt32* presentableFamilyQueue);
|
|
|
|
static Vk::Instance& GetInstance();
|
|
|
|
static const std::vector<Vk::PhysicalDevice>& GetPhysicalDevices();
|
|
static const Vk::PhysicalDevice& GetPhysicalDeviceInfo(VkPhysicalDevice physDevice);
|
|
|
|
static bool Initialize();
|
|
|
|
static bool IsInitialized();
|
|
|
|
static Vk::DeviceHandle SelectDevice(VkPhysicalDevice gpu, const Vk::Surface& surface, UInt32* presentableFamilyQueue);
|
|
|
|
static void SetParameters(const ParameterList& parameters);
|
|
|
|
static void Uninitialize();
|
|
|
|
private:
|
|
static std::list<Vk::Device> s_devices;
|
|
static std::vector<Vk::PhysicalDevice> s_physDevices;
|
|
static Vk::Instance s_instance;
|
|
static ParameterList s_initializationParameters;
|
|
static unsigned int s_moduleReferenceCounter;
|
|
};
|
|
}
|
|
|
|
#endif // NAZARA_VULKAN_HPP
|