OpenBarnyard
 
Loading...
Searching...
No Matches
AWorldMaterial.h
Go to the documentation of this file.
1#pragma once
2#include <Render/TMaterial.h>
3#include <Render/TTexture.h>
4
5class AWorldMaterial : public Toshi::TMaterial
6{
7public:
8 TDECLARE_CLASS( AWorldMaterial, Toshi::TMaterial );
9
10 static constexpr TUINT MAX_TEXTURES = 4;
11
12 using BLENDMODE = TINT;
13
14public:
17
18 //-----------------------------------------------------------------------------
19 // Own methods
20 //-----------------------------------------------------------------------------
21 virtual TBOOL Create( BLENDMODE a_eBlendMode );
22 virtual void SetBlendMode( BLENDMODE a_eBlendMode );
23
25
26 void SetTexture( TUINT a_uiStage, Toshi::TTexture* a_pTexture )
27 {
28 TASSERT( a_uiStage < MAX_TEXTURES );
29 m_aTextures[ a_uiStage ] = a_pTexture;
30 }
31
32protected:
33 Toshi::TTexture* m_aTextures[ MAX_TEXTURES ];
39};
Texture system for the Toshi engine.
#define TASSERT(X,...)
Definition Defines.h:138
unsigned int TUINT
Definition Typedefs.h:8
float TFLOAT
Definition Typedefs.h:4
int TINT
Definition Typedefs.h:7
bool TBOOL
Definition Typedefs.h:6
static constexpr TUINT MAX_TEXTURES
void SetTexture(TUINT a_uiStage, Toshi::TTexture *a_pTexture)
virtual void SetBlendMode(BLENDMODE a_eBlendMode)
virtual TBOOL Create(BLENDMODE a_eBlendMode)
TDECLARE_CLASS(AWorldMaterial, Toshi::TMaterial)
Toshi::TTexture * m_aTextures[MAX_TEXTURES]
AWorldMaterial::BLENDMODE GetBlendMode() const
BLENDMODE m_eBlendMode