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

void TSE::OpenGL::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);
    BasicOrderedSpriteSetShader::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());
    ShaderRegistry::SetShader("Basic Ordered Sprite Set Shader", BasicOrderedSpriteSetShader::Instance());
}

void TSE::OpenGL::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");
    ShaderRegistry::RemoveShader("Basic Ordered Sprite Set Shader");
    BasicShader::Destroy();
    BasicTextureShader::Destroy();
    DitheringShader::Destroy();
    BasicParticleShader::Destroy();
    BasicTileMapShader::Destroy();
    BasicOrderedSpriteSetShader::Destroy();
}
