#pragma once
#include "rtt.h"

struct Vive
{
    int comp_attempts = 0;
    uint32_t m_eye_width = 0, m_eye_height = 0;
    RTT m_eyes[2];
    vr::IVRSystem* m_hmd = nullptr;
    vr::IVRCompositor* m_comp = nullptr;
    vr::IVRSettings* m_settings = nullptr;
    glm::mat4 m_view[2];
    glm::mat4 m_proj[2];
    glm::mat4 m_pose;
    bool m_active = false;
    std::function<void(const glm::mat4& m_proj, const glm::mat4& m_view, const glm::mat4& m_pose)> on_draw = nullptr;

    bool Initialize();
    void Terminate();
    void Update();
    void Draw();
    bool Valid();
};
