mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 23:47:43 +00:00
Huge shader refactor
This commit is contained in:
@@ -2,10 +2,7 @@
|
||||
#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"
|
||||
#include "boo/graphicsdev/IGraphicsDataFactory.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
@@ -13,17 +10,6 @@ class CLineRenderer;
|
||||
|
||||
class CLineRendererShaders
|
||||
{
|
||||
public:
|
||||
struct IDataBindingFactory
|
||||
{
|
||||
virtual void BuildShaderDataBinding(boo::IGraphicsDataFactory::Context& ctx,
|
||||
CLineRenderer& renderer,
|
||||
const boo::ObjToken<boo::IShaderPipeline>& pipeline,
|
||||
const boo::ObjToken<boo::ITexture>& texture)=0;
|
||||
virtual ~IDataBindingFactory() = default;
|
||||
};
|
||||
|
||||
private:
|
||||
static boo::ObjToken<boo::IShaderPipeline> m_texAlpha;
|
||||
static boo::ObjToken<boo::IShaderPipeline> m_texAdditive;
|
||||
|
||||
@@ -38,25 +24,7 @@ private:
|
||||
|
||||
static boo::ObjToken<boo::IShaderPipeline> m_noTexAlphaZGEqual;
|
||||
|
||||
static boo::ObjToken<boo::IVertexFormat> m_texVtxFmt;
|
||||
static boo::ObjToken<boo::IVertexFormat> m_noTexVtxFmt;
|
||||
|
||||
static std::unique_ptr<IDataBindingFactory> m_bindFactory;
|
||||
|
||||
public:
|
||||
#if BOO_HAS_GL
|
||||
static IDataBindingFactory* Initialize(boo::GLDataFactory::Context& ctx);
|
||||
#endif
|
||||
#if _WIN32
|
||||
static IDataBindingFactory* Initialize(boo::D3DDataFactory::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,
|
||||
|
||||
Reference in New Issue
Block a user