#pragma once
#include <d3d11.h>
#include <dxgi1_5.h>

#include "sokol/sokol_header.h"
#include "core/render_context.h"
#include "core/render_elements.h"

class windows_mirage_render_context : public mirage_render_context {
public:
	windows_mirage_render_context() = default;

	bool init() override;
	virtual void end_init() override;
	void cleanup() override;
	virtual void tick(const duration_type& in_delta) override;

	sg_environment get_environment() override;
	bool setup_surface(mirage_window* in_window) override;
private:
	ID3D11Device* device{};
	ID3D11DeviceContext* device_context{};

	IDXGIFactory* dxgi_factory{};
	D3D_FEATURE_LEVEL feature_level;

	render_elements elements;
};
