mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 22:53:34 +00:00
begenning the refactor
This commit is contained in:
40
runtime/Includes/Renderer/Core/Device.h
git.filemode.normal_file
40
runtime/Includes/Renderer/Core/Device.h
git.filemode.normal_file
@@ -0,0 +1,40 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* Device.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/10/08 19:13:42 by maldavid #+# #+# */
|
||||
/* Updated: 2024/03/27 22:47:21 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef __MLX_VK_DEVICE__
|
||||
#define __MLX_VK_DEVICE__
|
||||
|
||||
namespace mlx
|
||||
{
|
||||
class Device
|
||||
{
|
||||
public:
|
||||
void Init();
|
||||
void Destroy() noexcept;
|
||||
|
||||
inline VkDevice& operator()() noexcept { return m_device; }
|
||||
inline VkDevice& Get() noexcept { return m_device; }
|
||||
|
||||
inline VkPhysicalDevice& GetPhysicalDevice() noexcept { return m_physical_device; }
|
||||
|
||||
private:
|
||||
void PickPhysicalDevice();
|
||||
bool CheckDeviceExtensionSupport(VkPhysicalDevice device);
|
||||
int DeviceScore(VkPhysicalDevice device);
|
||||
|
||||
private:
|
||||
VkPhysicalDevice m_physical_device = VK_NULL_HANDLE;
|
||||
VkDevice m_device = VK_NULL_HANDLE;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // __MLX_VK_DEVICE__
|
||||
Reference in New Issue
Block a user