11 :
public Toshi::TObject
12 ,
public Toshi::TSingleton<AMaterialLibraryManager>
18 class List :
public Toshi::TSingleton<List>
27 Toshi::T2DList<AMaterialLibrary> m_Libraries;
37 m_pTexture = a_pTexture;
45 void SetName(
const Toshi::TString8& a_Name )
63 return m_pMaterialLibrary;
68 m_pMaterialLibrary = a_pLibrary;
72 Toshi::TTexture* m_pTexture;
73 Toshi::TString8 m_Name;
77 using LibrariesMap = Toshi::T2Map<Toshi::TPString8, AMaterialLibrary*, Toshi::TPString8::Comparator>;
85 void LoadLibrary(
const Toshi::TPString8& a_rLibName, Toshi::TTRB* a_pTRB,
TBOOL a_bIsGUI );
98 void DestroyLibrary( LibrariesMap::Iterator& a_rcMaterialLibraryNode,
TBOOL a_bUpdateGUIMaterials );
101 Toshi::T2Map<Toshi::TPString8, int, Toshi::TPString8::Comparator> m_NumRefLibraries;
104 Toshi::T2SList<TextureSlot> m_UsedTextures;
105 Toshi::T2SList<TextureSlot> m_FreeTextures;
106 TINT m_iNumUsedTextures;
107 TINT m_iNumFreeTextures;
Texture system for the Toshi engine.
#define TDECLARE_CLASS(THIS_CLASS, PARENT_CLASS)
Toshi::T2Map< Toshi::TPString8, AMaterialLibrary *, Toshi::TPString8::Comparator > LibrariesMap
void UnloadLibrary(const Toshi::TPString8 &a_rLibName, TBOOL a_bUnused)
void OnLibraryLoaded(TBOOL a_bIsGUI)
void UnloadTexturesOfLibrary(AMaterialLibrary *a_pMaterialLibrary)
void LoadLibrariesFromProperties(const PBPropertyValue *a_pProperty, Toshi::TTRB *a_pTRB, TBOOL a_bUpdateGUIMaterials)
static constexpr TUINT MAX_NUM_TEXTURES
Toshi::TTexture * FindTexture(const TCHAR *a_szTextureName)
TINT GetNumUsedTextures() const
void CreateTextures(AMaterialLibrary *a_pMatLibrary)
void LoadLibrary(const Toshi::TPString8 &a_rLibName, Toshi::TTRB *a_pTRB, TBOOL a_bIsGUI)
TINT GetNumFreeTextures() const
AMaterialLibraryManager()
AMaterialLibrary * CreateLibraryFromAsset(const TCHAR *a_szFilePath, Toshi::TTRB *a_pTRB)
ATexture * FindTexture(const TCHAR *a_szTextureName, AMaterialLibrary **a_ppMaterialLibrary, TINT *a_pTextureIndex)
void DestroyLibrary(AMaterialLibrary *a_pLibrary)
AMaterialLibrary * CreateLibraryFromTRB(Toshi::TTRB *a_pTRB, const TCHAR *a_szFilePath)
void SetTexture(Toshi::TTexture *a_pTexture)
Toshi::TTexture * GetTexture() const
void SetName(const Toshi::TString8 &a_Name)
const Toshi::TString8 & GetName()
void SetLibrary(AMaterialLibrary *a_pLibrary)
AMaterialLibrary * GetLibrary() const