project-aster/aster/swapchain.h

32 lines
698 B
C++

/// =============================================
// Aster: swapchain.h
// Copyright (c) 2020-2024 Anish Bhobe
// ==============================================
#pragma once
#include "global.h"
#include <EASTL/fixed_vector.h>
struct PhysicalDevice;
struct Window;
struct Device;
struct Swapchain final
{
const Device *m_Device;
vk::SwapchainKHR m_Swapchain;
NameString m_Name;
vk::Extent2D m_Extent;
eastl::fixed_vector<vk::Image, 4> m_Images;
eastl::fixed_vector<vk::ImageView, 4> m_ImageViews;
Swapchain(const Window *window, const Device *device, NameString &&name);
~Swapchain();
void Create(const Window *window);
private:
void Cleanup();
};