#include "defaultShaderHandler.hpp"
#include "basicShader.hpp"
#include "basicTextureShader.hpp"
#include "ditheringShader.hpp"
#include "basicParticleShader.hpp"
#include "basicTileMapShader.hpp"
#include "elements/ShaderRegistry.hpp"

void TSE::GLFW::LoadBasicShaders(float width, float height)
{
    BasicShader::Init(width, height);
    BasicTextureShader::Init(width, height);
    DitheringShader::Init(width, height);
    BasicParticleShader::Init(width, height);
    BasicTileMapShader::Init(width, height);
    ShaderRegistry::SetShader("Basic Unlit Shader", BasicShader::Instance());
    ShaderRegistry::SetShader("Basic Unlit Texture Shader", BasicTextureShader::Instance());
    ShaderRegistry::SetShader("Basic Unlit Dithering Shader", DitheringShader::Instance());
    ShaderRegistry::SetShader("Basic Unlit Particle Shader", BasicParticleShader::Instance());
    ShaderRegistry::SetShader("Basic Unlit TileMap Shader", BasicTileMapShader::Instance());
}

void TSE::GLFW::UnLoadBasicShaders()
{
    ShaderRegistry::RemoveShader("Basic Unlit Shader");
    ShaderRegistry::RemoveShader("Basic Unlit Texture Shader");
    ShaderRegistry::RemoveShader("Basic Unlit Dithering Shader");
    ShaderRegistry::RemoveShader("Basic Unlit Particle Shader");
    ShaderRegistry::RemoveShader("Basic Unlit TileMap Shader");
    BasicShader::Destroy();
    BasicTextureShader::Destroy();
    DitheringShader::Destroy();
    BasicParticleShader::Destroy();
    BasicTileMapShader::Destroy();
}
