/*
	ApplicationFramework
	by John Ryland
	Copyright (c) 2023
*/

////////////////////////////////////////////////////////////////////////////////////
//	Glfw Vulkan Surface

#include "GlfwVulkanSurface.h"
#define GLFW_INCLUDE_NONE
#define GLFW_INCLUDE_VULKAN
#include <GLFW/glfw3.h>
#include <cstdio>
#include <cstdlib>

namespace ApplicationFramework {

GlfwVulkanSurface::GlfwVulkanSurface(IWindowSystem* windowSystem, IRenderSystem* renderSystem)
    : IWindowRenderSurfaceSystem(windowSystem, renderSystem)
    , m_windowSystem((GlfwWindowSystem*)windowSystem)
    , m_renderSystem((VulkanRenderer*)renderSystem)
{
}

// virtual
GlfwVulkanSurface::~GlfwVulkanSurface()
{
}

// virtual
void* GlfwVulkanSurface::CreateWindowSurface(IWindow* window)
{
/*
// virtual
int GlfwVulkanSurface::CreateVulkanWindowSurface(VkInstance instance, Window* win, const VkAllocationCallbacks* allocator, VkSurfaceKHR* surface)
{
    return glfwCreateWindowSurface(instance, m_windows[win], allocator, surface);
}
*/
}

// virtual
void GlfwVulkanSurface::DestroyWindowSurface(IWindow* window, void* surface)
{
}

// virtual
void GlfwVulkanSurface::Initialize()
{
    if (!glfwVulkanSupported())
    {
        fprintf(stderr, "[glfw] Error: Vulkan Not Supported\n");
        exit(-1);
    }
}

// virtual
void GlfwVulkanSurface::Shutdown()
{
}

// virtual
void GlfwVulkanSurface::Prepare()
{
}

// virtual
void GlfwVulkanSurface::Update()
{
}

// virtual
void GlfwVulkanSurface::Render()
{
}

// virtual
void GlfwVulkanSurface::Present()
{
}

} // ApplicationFramework namespace
