From 2cb142c9b73e5cb16b80b5f66376eeb963e10c7a Mon Sep 17 00:00:00 2001 From: AdventureT Date: Sat, 30 Dec 2023 18:36:33 +0100 Subject: [PATCH] Minor Changes --- Toshi/Include/TRenderD3D/TTextureFactoryHAL.h | 10 +++++++++- Toshi/Source/TRender/TRenderInterface.cpp | 12 +++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Toshi/Include/TRenderD3D/TTextureFactoryHAL.h b/Toshi/Include/TRenderD3D/TTextureFactoryHAL.h index 57d5a57..7190f63 100644 --- a/Toshi/Include/TRenderD3D/TTextureFactoryHAL.h +++ b/Toshi/Include/TRenderD3D/TTextureFactoryHAL.h @@ -9,7 +9,15 @@ class TOSHI_EXPORT TTextureFactoryHAL { public: - virtual TTextureResource* CreateEx(TPVOID); + enum TTEXTURERESOURCEFORMAT + { + + }; + + virtual TTextureResource* CreateEx(TPVOID a_pData, TUINT a_uiDataSize, TUINT a_uiWidth, TUINT a_uiHeight, TUINT a_uiMipLevels, TTEXTURERESOURCEFORMAT a_eFormat, BOOL a_bNoMipLevels) + { + return TNULL; + } }; diff --git a/Toshi/Source/TRender/TRenderInterface.cpp b/Toshi/Source/TRender/TRenderInterface.cpp index 8c1cc7f..c52112a 100644 --- a/Toshi/Source/TRender/TRenderInterface.cpp +++ b/Toshi/Source/TRender/TRenderInterface.cpp @@ -42,11 +42,17 @@ TBOOL TRenderInterface::CreateSystemResources() TCString(" Adding base resources\n").Print(); } + TBOOL bRes = TFALSE; + m_aSysResources[SYSRESOURCE_VFACTORIES] = CreateResource(&TGetClass(TNullResource), "VFactories", TNULL); - m_aSysResources[SYSRESOURCE_VFSYSSVNDUV1] = CreateResource(TFindClass(TVertexFactoryResource, TNULL), "VFSYSSVNDUV1", GetSystemResource(SYSRESOURCE_VFACTORIES)); - TVALIDADDRESS(m_aSysResources[SYSRESOURCE_VFSYSSVNDUV1]); + //m_aSysResources[SYSRESOURCE_VFSYSSVNDUV1] = CreateResource(TFindClass(TVertexFactoryResource, TNULL), "VFSYSSVNDUV1", GetSystemResource(SYSRESOURCE_VFACTORIES)); + //TVALIDADDRESS(m_aSysResources[SYSRESOURCE_VFSYSSVNDUV1]); + + m_aSysResources[SYSRESOURCE_TEXTUREFACTORY] = CreateResource(TFindClass(TTextureFactoryHAL, TNULL), "TextureFactory", TNULL); + bRes = m_aSysResources[SYSRESOURCE_TEXTUREFACTORY]->Create(); + TASSERT(TTRUE==bRes); - return TBOOL(); + return TTRUE; } TResource* TRenderInterface::CreateResource(const TClass* a_pClass, TPCCHAR a_szResName, TResource* a_pParent)