From 3218cc088fc7ce1fb6dae54e73fd70f266723d25 Mon Sep 17 00:00:00 2001 From: assiduous Date: Mon, 30 Nov 2020 18:13:22 -0800 Subject: GLTF Loader: updated GPU resource initialization --- AssetLoader/interface/GLTFLoader.hpp | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'AssetLoader/interface') diff --git a/AssetLoader/interface/GLTFLoader.hpp b/AssetLoader/interface/GLTFLoader.hpp index 8240694..a0c887f 100644 --- a/AssetLoader/interface/GLTFLoader.hpp +++ b/AssetLoader/interface/GLTFLoader.hpp @@ -54,8 +54,6 @@ namespace Diligent namespace GLTF { -struct GLTFTextureUpdateData; - struct GLTFCacheInfo { GLTFResourceManager* pResourceMgr = nullptr; @@ -305,10 +303,12 @@ struct Model RefCntAutoPtr pTexture; GLTFResourceManager::TextureAllocation CacheAllocation; float4 UVScaleBias{1, 1, 0, 0}; - std::unique_ptr UpdateData; }; std::vector Textures; + struct ResourceInitData; + std::unique_ptr InitData; + ITexture* GetTexture(Uint32 Index) { return Textures[Index].pTexture; @@ -362,14 +362,11 @@ private: TextureCacheType* pTextureCache, GLTFCacheInfo* pCache); - void LoadNode(IRenderDevice* pDevice, - Node* parent, - const tinygltf::Node& gltf_node, - uint32_t nodeIndex, - const tinygltf::Model& gltf_model, - std::vector& indexBuffer, - std::vector& vertexData0, - std::vector& vertexData1); + void LoadNode(IRenderDevice* pDevice, + Node* parent, + const tinygltf::Node& gltf_node, + uint32_t nodeIndex, + const tinygltf::Model& gltf_model); void LoadSkins(const tinygltf::Model& gltf_model); @@ -387,9 +384,6 @@ private: Node* NodeFromIndex(uint32_t index); GLTFCacheInfo CacheInfo; - - bool TexturesTransitioned = false; - bool TexturesUpdated = false; }; } // namespace GLTF -- cgit v1.2.3