vOOlkan
An object oriented approach to Vulkan
Queue.h
Go to the documentation of this file.
1#ifndef VULKAN_QUEUE
2#define VULKAN_QUEUE
3
4#include <vulkan/vulkan.h>
5#include <utility>
6
7
8namespace Vulkan { class Queue; class LogicalDevice; enum class QueueFamily; }
9
14 public:
15
23 Queue(const LogicalDevice& virtualGpu, std::pair<QueueFamily, int> queueFamilyIndex);
24
25
31 const VkQueue& operator+() const;
32
38 QueueFamily getFamily() const;
39
45 int getFamilyIndex() const;
46
47
48 private:
49 VkQueue queue;
50 QueueFamily family;
51 int queueFamilyIndex;
52};
53
54#endif
55
A logical device is an abstraction of the physical GPU which we can mainly use to send commands.
Definition: LogicalDevice.h:15
A Queue is an abstraction over the VkQueue Vulkan object. A Queue is where commands from the CPU to t...
Definition: Queue.h:13
int getFamilyIndex() const
Returns the physical GPU queue family index for this queue.
Definition: Queue.cpp:26
const VkQueue & operator+() const
Returns the underlying VkQueue object.
Definition: Queue.cpp:14
QueueFamily getFamily() const
Returns the family of the queue.
Definition: Queue.cpp:20
Queue(const LogicalDevice &virtualGpu, std::pair< QueueFamily, int > queueFamilyIndex)
Creates a queue by getting it from the LogicalDevice.
Definition: Queue.cpp:7
Types of queue families.
Definition: Animations.h:17
QueueFamily
Definition: QueueFamily.h:8