2016-02-18 02:42:32 +00:00
|
|
|
#ifndef __PSHAG_CLINERENDERERSHADERS_HPP__
|
|
|
|
#define __PSHAG_CLINERENDERERSHADERS_HPP__
|
|
|
|
|
2016-03-04 23:04:53 +00:00
|
|
|
#include "Graphics/CGraphics.hpp"
|
2016-02-18 02:42:32 +00:00
|
|
|
#include "boo/graphicsdev/GL.hpp"
|
|
|
|
#include "boo/graphicsdev/D3D.hpp"
|
|
|
|
#include "boo/graphicsdev/Metal.hpp"
|
2016-02-23 02:34:16 +00:00
|
|
|
#include "boo/graphicsdev/Vulkan.hpp"
|
2016-02-18 02:42:32 +00:00
|
|
|
|
2016-03-04 23:04:53 +00:00
|
|
|
namespace urde
|
2016-02-18 02:42:32 +00:00
|
|
|
{
|
|
|
|
class CLineRenderer;
|
|
|
|
|
|
|
|
class CLineRendererShaders
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
struct IDataBindingFactory
|
|
|
|
{
|
|
|
|
virtual void BuildShaderDataBinding(CLineRenderer& renderer, boo::IShaderPipeline* pipeline,
|
|
|
|
boo::ITexture* texture)=0;
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
static boo::IShaderPipeline* m_texAlpha;
|
|
|
|
static boo::IShaderPipeline* m_texAdditive;
|
|
|
|
|
|
|
|
static boo::IShaderPipeline* m_noTexAlpha;
|
|
|
|
static boo::IShaderPipeline* m_noTexAdditive;
|
|
|
|
|
2016-02-18 07:36:36 +00:00
|
|
|
static boo::IVertexFormat* m_texVtxFmt;
|
|
|
|
static boo::IVertexFormat* m_noTexVtxFmt;
|
|
|
|
|
2016-02-18 02:42:32 +00:00
|
|
|
static std::unique_ptr<IDataBindingFactory> m_bindFactory;
|
|
|
|
static boo::GraphicsDataToken m_gfxToken;
|
|
|
|
|
|
|
|
public:
|
|
|
|
static IDataBindingFactory* Initialize(boo::GLDataFactory& factory);
|
|
|
|
#if _WIN32
|
|
|
|
static IDataBindingFactory* Initialize(boo::ID3DDataFactory& factory);
|
2016-02-23 02:34:16 +00:00
|
|
|
#endif
|
|
|
|
#if BOO_HAS_METAL
|
2016-02-18 02:42:32 +00:00
|
|
|
static IDataBindingFactory* Initialize(boo::MetalDataFactory& factory);
|
|
|
|
#endif
|
2016-02-23 02:34:16 +00:00
|
|
|
#if BOO_HAS_VULKAN
|
|
|
|
static IDataBindingFactory* Initialize(boo::VulkanDataFactory& factory);
|
|
|
|
#endif
|
2016-02-18 02:42:32 +00:00
|
|
|
|
|
|
|
static void Initialize();
|
|
|
|
static void Shutdown();
|
|
|
|
static void BuildShaderDataBinding(CLineRenderer& renderer, boo::ITexture* texture, bool additive);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __PSHAG_CLINERENDERERSHADERS_HPP__
|