#ifndef __URDE_CLINERENDERERSHADERS_HPP__ #define __URDE_CLINERENDERERSHADERS_HPP__ #include "Graphics/CGraphics.hpp" #include "boo/graphicsdev/GL.hpp" #include "boo/graphicsdev/D3D.hpp" #include "boo/graphicsdev/Metal.hpp" #include "boo/graphicsdev/Vulkan.hpp" namespace urde { class CLineRenderer; class CLineRendererShaders { public: struct IDataBindingFactory { virtual void BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx, CLineRenderer& renderer, const boo::ObjToken& pipeline, const boo::ObjToken& texture)=0; virtual ~IDataBindingFactory() = default; }; private: static boo::ObjToken m_texAlpha; static boo::ObjToken m_texAdditive; static boo::ObjToken m_noTexAlpha; static boo::ObjToken m_noTexAdditive; static boo::ObjToken m_texAlphaZ; static boo::ObjToken m_texAdditiveZ; static boo::ObjToken m_noTexAlphaZ; static boo::ObjToken m_noTexAdditiveZ; static boo::ObjToken m_noTexAlphaZGEqual; static boo::ObjToken m_texVtxFmt; static boo::ObjToken m_noTexVtxFmt; static std::unique_ptr m_bindFactory; public: #if BOO_HAS_GL static IDataBindingFactory* Initialize(boo::GLDataFactory::Context& ctx); #endif #if _WIN32 static IDataBindingFactory* Initialize(boo::ID3DDataFactory::Context& ctx); #endif #if BOO_HAS_METAL static IDataBindingFactory* Initialize(boo::MetalDataFactory::Context& ctx); #endif #if BOO_HAS_VULKAN static IDataBindingFactory* Initialize(boo::VulkanDataFactory::Context& ctx); #endif static void Initialize(); static void Shutdown(); static void BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx, CLineRenderer& renderer, const boo::ObjToken& texture, bool additive, bool zTest, bool zGEqual); }; } #endif // __URDE_CLINERENDERERSHADERS_HPP__