Fling Engine  0.00.1
Fling Engine is a game engine written in Vulkan
Public Member Functions | Private Member Functions | Private Attributes
Fling::PhysicalDevice Class Reference

A physical device represents the Vulkan physical device (the GPU) that we are currently using. More...

#include <PhyscialDevice.h>

Public Member Functions

 PhysicalDevice (class Instance *t_Instance)
 
 ~PhysicalDevice () noexcept=default
 The physical device will get cleaned up when the Instance does automatically. More...
 
 operator const VkPhysicalDevice & () const
 
const VkPhysicalDevice & GetVkPhysicalDevice () const
 
const VkPhysicalDeviceProperties & GetDeviceProps () const
 
const VkPhysicalDeviceFeatures & GetDeivceFeatures () const
 
void LogPhysicalDeviceInfo ()
 Logs info about this physical device (vendor, model, ID, etc) to the console/Log file. More...
 

Private Member Functions

VkPhysicalDevice ChooseBestPhyscialDevice (std::vector< VkPhysicalDevice > &t_AvailableDevices)
 Choose the best available physical device on this machine favoring discrete GPU's and those who match all instance extensions. More...
 

Private Attributes

VkPhysicalDevice m_PhysicalDevice = VK_NULL_HANDLE
 The Vulkan physical device. More...
 
const class Instancem_Instance
 Owning instance of this physical device. More...
 
VkPhysicalDeviceProperties m_DeviceProperties {}
 Misc. More...
 
VkPhysicalDeviceFeatures m_DeviceFeatures {}
 
VkPhysicalDeviceMemoryProperties m_MemoryProperties {}
 

Detailed Description

A physical device represents the Vulkan physical device (the GPU) that we are currently using.

Constructor & Destructor Documentation

◆ PhysicalDevice()

Fling::PhysicalDevice::PhysicalDevice ( class Instance t_Instance)
explicit

◆ ~PhysicalDevice()

Fling::PhysicalDevice::~PhysicalDevice ( )
defaultnoexcept

The physical device will get cleaned up when the Instance does automatically.

Member Function Documentation

◆ ChooseBestPhyscialDevice()

VkPhysicalDevice Fling::PhysicalDevice::ChooseBestPhyscialDevice ( std::vector< VkPhysicalDevice > &  t_AvailableDevices)
private

Choose the best available physical device on this machine favoring discrete GPU's and those who match all instance extensions.

◆ GetDeivceFeatures()

const VkPhysicalDeviceFeatures& Fling::PhysicalDevice::GetDeivceFeatures ( ) const
inline

◆ GetDeviceProps()

const VkPhysicalDeviceProperties& Fling::PhysicalDevice::GetDeviceProps ( ) const
inline

◆ GetVkPhysicalDevice()

const VkPhysicalDevice& Fling::PhysicalDevice::GetVkPhysicalDevice ( ) const
inline

◆ LogPhysicalDeviceInfo()

void Fling::PhysicalDevice::LogPhysicalDeviceInfo ( )

Logs info about this physical device (vendor, model, ID, etc) to the console/Log file.

◆ operator const VkPhysicalDevice &()

Fling::PhysicalDevice::operator const VkPhysicalDevice & ( ) const
inline

Field Documentation

◆ m_DeviceFeatures

VkPhysicalDeviceFeatures Fling::PhysicalDevice::m_DeviceFeatures {}
private

◆ m_DeviceProperties

VkPhysicalDeviceProperties Fling::PhysicalDevice::m_DeviceProperties {}
private

Misc.

Device properties that may be useful

◆ m_Instance

const class Instance* Fling::PhysicalDevice::m_Instance
private

Owning instance of this physical device.

◆ m_MemoryProperties

VkPhysicalDeviceMemoryProperties Fling::PhysicalDevice::m_MemoryProperties {}
private

◆ m_PhysicalDevice

VkPhysicalDevice Fling::PhysicalDevice::m_PhysicalDevice = VK_NULL_HANDLE
private

The Vulkan physical device.


The documentation for this class was generated from the following files: