mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-12 07:03:34 +00:00
fixing compatibility, workign on renderer
This commit is contained in:
41
src/renderer/core/vk_device.h
git.filemode.normal_file
41
src/renderer/core/vk_device.h
git.filemode.normal_file
@@ -0,0 +1,41 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* vk_device.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/10/08 19:13:42 by maldavid #+# #+# */
|
||||
/* Updated: 2022/12/18 01:08:11 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef __MLX_VK_DEVICE__
|
||||
#define __MLX_VK_DEVICE__
|
||||
|
||||
#include <volk.h>
|
||||
|
||||
namespace mlx
|
||||
{
|
||||
class Device
|
||||
{
|
||||
public:
|
||||
void init();
|
||||
void destroy() noexcept;
|
||||
|
||||
inline VkDevice& operator()() noexcept { return _device; }
|
||||
inline VkDevice& get() noexcept { return _device; }
|
||||
|
||||
inline VkPhysicalDevice& getPhysicalDevice() noexcept { return _physicalDevice; }
|
||||
|
||||
private:
|
||||
void pickPhysicalDevice();
|
||||
bool isDeviceSuitable(VkPhysicalDevice device);
|
||||
bool checkDeviceExtensionSupport(VkPhysicalDevice device);
|
||||
|
||||
VkPhysicalDevice _physicalDevice = VK_NULL_HANDLE;
|
||||
VkDevice _device = VK_NULL_HANDLE;
|
||||
};
|
||||
}
|
||||
|
||||
#endif // __MLX_VK_DEVICE__
|
||||
Reference in New Issue
Block a user