![]() |
FastEngine 0.9.4
A multiplayer oriented 2D engine made with Vulkan.
|
Vulkan instance abstraction. More...
#include <C_instance.hpp>
Public Member Functions | |
| Instance (std::string_view applicationName, uint16_t versionMajor=1, uint16_t versionMinor=0, uint16_t versionPatch=0) | |
| Instance (Instance const &r)=delete | |
| Instance (Instance &&r) noexcept | |
| Instance & | operator= (Instance const &r)=delete |
| Instance & | operator= (Instance &&r) noexcept=delete |
| void | create (std::string_view applicationName, uint16_t versionMajor=1, uint16_t versionMinor=0, uint16_t versionPatch=0) |
| Create the instance. | |
| void | destroy () |
| tiny_utf8::string const & | getApplicationName () const |
| VkInstance | get () const |
| std::vector< PhysicalDevice > const & | getPhysicalDevices () const |
| Get a list of physical devices. | |
| std::optional< PhysicalDevice > | pickPhysicalDevice (VkSurfaceKHR surface) const |
| Pick a physical device. | |
Vulkan instance abstraction.
This class is used to create a Vulkan instance and get the physical devices.
|
explicit |
| void fge::vulkan::Instance::create | ( | std::string_view | applicationName, |
| uint16_t | versionMajor = 1, | ||
| uint16_t | versionMinor = 0, | ||
| uint16_t | versionPatch = 0 ) |
Create the instance.
| applicationName | The application name |
| versionMajor | The application version major |
| versionMinor | The application version minor |
| versionPatch | The application version patch |
|
nodiscard |
Get a list of physical devices.
You have to create the instance before calling this function.
|
nodiscard |
Pick a physical device.
Pick a physical device that support the surface based on a score. It will prioritize discrete GPU over integrated GPU.
| surface | The surface |