metaforce/Runtime/Particle/CElementGenShaders.hpp

84 lines
2.6 KiB
C++
Raw Normal View History

2016-02-15 04:00:26 +00:00
#ifndef __PSHAG_CELEMENTGENSHADERS_HPP__
#define __PSHAG_CELEMENTGENSHADERS_HPP__
2016-03-04 23:04:53 +00:00
#include "Graphics/CGraphics.hpp"
2016-02-15 04:00:26 +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-15 04:00:26 +00:00
2016-03-04 23:04:53 +00:00
namespace urde
2016-02-15 04:00:26 +00:00
{
class CElementGen;
class CElementGenShaders
{
public:
struct IDataBindingFactory
{
virtual void BuildShaderDataBinding(CElementGen& gen,
boo::IShaderPipeline* regPipeline,
boo::IShaderPipeline* redToAlphaPipeline)=0;
};
enum class EShaderClass
{
Tex,
IndTex,
NoTex
};
private:
static boo::IShaderPipeline* m_texZTestZWrite;
static boo::IShaderPipeline* m_texNoZTestZWrite;
static boo::IShaderPipeline* m_texZTestNoZWrite;
static boo::IShaderPipeline* m_texNoZTestNoZWrite;
static boo::IShaderPipeline* m_texAdditiveZTest;
static boo::IShaderPipeline* m_texAdditiveNoZTest;
static boo::IShaderPipeline* m_texRedToAlphaZTest;
static boo::IShaderPipeline* m_texRedToAlphaNoZTest;
static boo::IShaderPipeline* m_indTexZWrite;
static boo::IShaderPipeline* m_indTexNoZWrite;
static boo::IShaderPipeline* m_indTexAdditive;
static boo::IShaderPipeline* m_cindTexZWrite;
static boo::IShaderPipeline* m_cindTexNoZWrite;
static boo::IShaderPipeline* m_cindTexAdditive;
static boo::IShaderPipeline* m_noTexZTestZWrite;
static boo::IShaderPipeline* m_noTexNoZTestZWrite;
static boo::IShaderPipeline* m_noTexZTestNoZWrite;
static boo::IShaderPipeline* m_noTexNoZTestNoZWrite;
static boo::IShaderPipeline* m_noTexAdditiveZTest;
static boo::IShaderPipeline* m_noTexAdditiveNoZTest;
static boo::IVertexFormat* m_vtxFormatTex; /* No OpenGL */
static boo::IVertexFormat* m_vtxFormatIndTex; /* No OpenGL */
static boo::IVertexFormat* m_vtxFormatNoTex; /* No OpenGL */
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-15 04:00:26 +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-15 04:00:26 +00:00
static void Initialize();
2016-02-16 19:42:24 +00:00
static void Shutdown();
2016-02-15 04:00:26 +00:00
static EShaderClass GetShaderClass(CElementGen& gen);
static void BuildShaderDataBinding(CElementGen& gen);
};
}
#endif // __PSHAG_CELEMENTGENSHADERS_HPP__