Files
MacroLibX/src/renderer/core/vk_surface.h
2024-01-03 15:30:35 +01:00

39 lines
1.4 KiB
C++

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* vk_surface.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/08 18:57:55 by maldavid #+# #+# */
/* Updated: 2024/01/03 15:26:43 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef __MLX_VK_SURFACE__
#define __MLX_VK_SURFACE__
#include <mlx_profile.h>
#include <volk.h>
#include <vector>
namespace mlx
{
class Surface
{
public:
void create(class Renderer& renderer);
void destroy() noexcept;
VkSurfaceFormatKHR chooseSwapSurfaceFormat(const std::vector<VkSurfaceFormatKHR>& availableFormats);
inline VkSurfaceKHR& operator()() noexcept { return _surface; }
inline VkSurfaceKHR& get() noexcept { return _surface; }
private:
VkSurfaceKHR _surface = VK_NULL_HANDLE;
};
}
#endif // __MLX_VK_SURFACE__