CDecalShaders: Make use of static inline variables

Same behavior, less code.
This commit is contained in:
Lioncash 2020-08-02 02:53:12 -04:00
parent 1b52070f4f
commit 4e1ff26f56
2 changed files with 5 additions and 12 deletions

View File

@ -8,13 +8,6 @@
namespace urde { namespace urde {
boo::ObjToken<boo::IShaderPipeline> CDecalShaders::m_texZTestNoZWrite;
boo::ObjToken<boo::IShaderPipeline> CDecalShaders::m_texAdditiveZTest;
boo::ObjToken<boo::IShaderPipeline> CDecalShaders::m_texRedToAlphaZTest;
boo::ObjToken<boo::IShaderPipeline> CDecalShaders::m_noTexZTestNoZWrite;
boo::ObjToken<boo::IShaderPipeline> CDecalShaders::m_noTexAdditiveZTest;
void CDecalShaders::Initialize() { void CDecalShaders::Initialize() {
m_texZTestNoZWrite = hecl::conv->convert(Shader_CDecalShaderTexZTest{}); m_texZTestNoZWrite = hecl::conv->convert(Shader_CDecalShaderTexZTest{});
m_texAdditiveZTest = hecl::conv->convert(Shader_CDecalShaderTexAdditiveZTest{}); m_texAdditiveZTest = hecl::conv->convert(Shader_CDecalShaderTexAdditiveZTest{});

View File

@ -7,12 +7,12 @@ struct CQuadDecal;
class CDecalShaders { class CDecalShaders {
private: private:
static boo::ObjToken<boo::IShaderPipeline> m_texZTestNoZWrite; static inline boo::ObjToken<boo::IShaderPipeline> m_texZTestNoZWrite;
static boo::ObjToken<boo::IShaderPipeline> m_texAdditiveZTest; static inline boo::ObjToken<boo::IShaderPipeline> m_texAdditiveZTest;
static boo::ObjToken<boo::IShaderPipeline> m_texRedToAlphaZTest; static inline boo::ObjToken<boo::IShaderPipeline> m_texRedToAlphaZTest;
static boo::ObjToken<boo::IShaderPipeline> m_noTexZTestNoZWrite; static inline boo::ObjToken<boo::IShaderPipeline> m_noTexZTestNoZWrite;
static boo::ObjToken<boo::IShaderPipeline> m_noTexAdditiveZTest; static inline boo::ObjToken<boo::IShaderPipeline> m_noTexAdditiveZTest;
public: public:
static void Initialize(); static void Initialize();