#pragma once

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

////////////////////////////////////////////////////////////////////////////////////
//	Vulkan Renderer

#include "IRenderSystem.h"
#include "VulkanTexture.h"
#include "VulkanDevice.h"
#include <memory>

namespace ApplicationFramework {

class Image;
class Texture;
struct VulkanRendererDetails;

class VulkanRenderer : public IRenderSystem
{
public:
    VulkanRenderer();
    ~VulkanRenderer() override;

    void CreateWindow(Window* window) override;
    void DestroyWindow(Window* window) override;

    Vulkan::Device* Details();
    TextureId LoadTexture(VkImageView imageView, int w, int h) override;

    //Texture& CreateTexture(int width, int height, int channels) override;
    TextureId CreateTexture(Image& image) override;
    //void UpdateTexture(Texture& texture, Image& image) override;
    void DestroyTexture(TextureId texture) override;

    void Initialize() override;
    void Shutdown() override;

    void Prepare() override;
    void Update() override;
    void Render() override;
    void Present() override;

private:
    std::unique_ptr<VulkanRendererDetails> m_details;
};

} // ApplicationFramework namespace
