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

#include "core/renderer/renderer_context.h"
#include "core/window/renderer_window.h"

class dx_window : public renderer_window {
public:
    void begin_frame() override;
    void end_frame() override;
protected:
    bool create_surface(GLFWwindow* in_window) override;
    void on_resize(const Eigen::Vector2i& in_size) override;

    HRESULT build_render_target_view();

private:
    renderer_context context;
    IDXGISwapChain1* swap_chain = nullptr;
    ID3D11RenderTargetView* render_target_view = nullptr;
    Eigen::Matrix4f projection_matrix;

};
