Add buffer support

This commit is contained in:
Jérôme Leclercq
2018-03-09 16:49:01 +01:00
parent 9b8e8042e4
commit cd31e6c397
27 changed files with 452 additions and 295 deletions

View File

@@ -16,17 +16,28 @@
#include <Nazara/VulkanRenderer/Wrapper/PhysicalDevice.hpp>
#include <Nazara/VulkanRenderer/Wrapper/Surface.hpp>
#include <list>
#include <memory>
#include <vector>
namespace Nz
{
class VulkanDevice;
class NAZARA_VULKANRENDERER_API Vulkan
{
public:
struct QueueFamily
{
UInt32 familyIndex;
float priority;
};
Vulkan() = delete;
~Vulkan() = delete;
static Vk::DeviceHandle CreateDevice(VkPhysicalDevice gpu, const Vk::Surface& surface, UInt32* presentableFamilyQueue);
static std::shared_ptr<VulkanDevice> CreateDevice(VkPhysicalDevice gpu);
static std::shared_ptr<VulkanDevice> CreateDevice(VkPhysicalDevice gpu, const Vk::Surface& surface, UInt32* presentableFamilyQueue);
static std::shared_ptr<VulkanDevice> CreateDevice(VkPhysicalDevice gpu, const QueueFamily* queueFamilies, std::size_t queueFamilyCount);
static Vk::Instance& GetInstance();
@@ -37,12 +48,13 @@ namespace Nz
static bool IsInitialized();
static Vk::DeviceHandle SelectDevice(VkPhysicalDevice gpu, const Vk::Surface& surface, UInt32* presentableFamilyQueue);
static std::shared_ptr<VulkanDevice> SelectDevice(VkPhysicalDevice gpu);
static std::shared_ptr<VulkanDevice> SelectDevice(VkPhysicalDevice gpu, const Vk::Surface& surface, UInt32* presentableFamilyQueue);
static void Uninitialize();
private:
static std::list<Vk::Device> s_devices;
static std::vector<std::weak_ptr<VulkanDevice>> s_devices;
static std::vector<Vk::PhysicalDevice> s_physDevices;
static Vk::Instance s_instance;
static ParameterList s_initializationParameters;