#include "render/render.h"
#include "wnd_render.h"
#include <iostream>
#include <mutex>
#include <render_type_def.h>


Render::Render() {}

Render::~Render() {
    delete m_window;
}

HWND Render::InitWindow(HINSTANCE hinstance,
                        PCWSTR titleName,
                        int width,
                        int height,
                        HWND parent,
                        DWORD dwStyle) {
    if (!m_window) m_window = new WndRender{};
    if (m_window->Init(hinstance, titleName, width, height, parent, dwStyle)) {
        return m_window->m_hwnd;
    }
    return nullptr;
}

DWORD Render::ExecWindow(int nCmdShow) {
    return m_window->Exec(nCmdShow);
}

void Render::EndWindow() {}
