Изменения способа выбора очередей показа
This commit is contained in:
@@ -12,8 +12,6 @@ typedef struct _PhysicalDevice
|
||||
VkPhysicalDeviceFeatures features; // функции
|
||||
VkPhysicalDeviceMemoryProperties memory; // память
|
||||
std::vector<VkQueueFamilyProperties> queueFamilyProperties; // семейства очередей
|
||||
|
||||
uint32_t pickQueueFamily(VkQueueFlags);
|
||||
} PhysicalDevice;
|
||||
|
||||
#endif // PHYSICALDEVICE_H
|
||||
|
||||
13
include/Queue.h
Normal file
13
include/Queue.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef QUEUE_H
|
||||
#define QUEUE_H
|
||||
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
typedef struct _Queue
|
||||
{
|
||||
uint32_t index;
|
||||
VkQueue descriptor;
|
||||
VkQueueFamilyProperties properties;
|
||||
} Queue;
|
||||
|
||||
#endif // QUEUE_H
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "PhysicalDevice.h"
|
||||
#include "Surface.h"
|
||||
#include "Queue.h"
|
||||
|
||||
class Vulkan
|
||||
{
|
||||
@@ -16,7 +17,7 @@ class Vulkan
|
||||
VkInstance instance; // Экземпляр Vulkan
|
||||
PhysicalDevice physicalDevice; // Физическое устройство
|
||||
VkDevice logicalDevice; // логическое устройство
|
||||
VkQueue graphicalQueue; // очередь для работы с графикой
|
||||
Queue queue; // очередь
|
||||
Surface surface; // Поверхность окна
|
||||
VkSwapchainKHR swapChain; // Список показа
|
||||
|
||||
@@ -29,6 +30,7 @@ class Vulkan
|
||||
|
||||
void createInstance(); // Создание экземпяра Vulkan
|
||||
void selectPhysicalDevice(std::vector<const char*> &deviceExtensions); // Выбор физического устройства
|
||||
void pickQueues(); // Выбор очередей
|
||||
void createLogicalDevice(std::vector<const char*> &deviceExtensions); // Создание логического устройства
|
||||
void createWindowSurface(GLFWwindow* window); // Создание поверхности окна
|
||||
void createSwapchain(GLFWwindow* window); // Создание цепочки показа
|
||||
|
||||
Reference in New Issue
Block a user