libmx2 2.2.1
C++20 multimedia and game-engine library (SDL2 / OpenGL / Vulkan)
Loading...
Searching...
No Matches
mx::QueueFamilyIndices Struct Reference

Tracks Vulkan queue family assignments needed to create a device. More...

#include <vk.hpp>

Public Member Functions

bool isComplete ()
 Check whether both required families have been found.

Public Attributes

std::optional< uint32_t > graphicsFamily
 Index of the graphics queue family.
std::optional< uint32_t > presentFamily
 Index of the presentation queue family.

Detailed Description

Tracks Vulkan queue family assignments needed to create a device.

Definition at line 72 of file vk.hpp.

Member Function Documentation

◆ isComplete()

bool mx::QueueFamilyIndices::isComplete ( )
inline

Check whether both required families have been found.

Returns
true if graphics and present families are both assigned.

Definition at line 80 of file vk.hpp.

References graphicsFamily, and presentFamily.

Referenced by mx::VKWindow::findQueueFamilies(), and mx::VKWindow::isDeviceSuitable().

Member Data Documentation

◆ graphicsFamily

std::optional<uint32_t> mx::QueueFamilyIndices::graphicsFamily

◆ presentFamily

std::optional<uint32_t> mx::QueueFamilyIndices::presentFamily

Index of the presentation queue family.

Definition at line 74 of file vk.hpp.

Referenced by mx::VKWindow::createLogicalDevice(), mx::VKWindow::createSwapChain(), mx::VKWindow::findQueueFamilies(), and isComplete().


The documentation for this struct was generated from the following file: