#pragma once
#include "core/window/render_window.h"
#include <d3d11.h>
#include <dxgi1_5.h>

struct windows_window_state final : mirage_window_state {
	ID3D11RenderTargetView* get_dx_render_target_view() const {
		return (ID3D11RenderTargetView*)swapchain.d3d11.render_view;
	}

	bool init(ID3D11Device* in_device, IDXGIFactory* in_factory, mirage_window* in_window);

	virtual void clear() override;

	virtual void present() override;

	virtual void resize(const Eigen::Vector2i& size) override;
private:
	ID3D11Device* dx_device{};
	IDXGIFactory* dxgi_factory{};
	IDXGISwapChain* dx_swap_chain{};
};
