diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-12-01 02:13:22 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-12-01 02:13:22 +0000 |
| commit | 3218cc088fc7ce1fb6dae54e73fd70f266723d25 (patch) | |
| tree | 737e5ac052605637736e5dc07f5e1dbda3384599 /AssetLoader/interface | |
| parent | GLTF Loader: refactored material textures loading (diff) | |
| download | DiligentTools-3218cc088fc7ce1fb6dae54e73fd70f266723d25.tar.gz DiligentTools-3218cc088fc7ce1fb6dae54e73fd70f266723d25.zip | |
GLTF Loader: updated GPU resource initialization
Diffstat (limited to 'AssetLoader/interface')
| -rw-r--r-- | AssetLoader/interface/GLTFLoader.hpp | 22 |
1 files changed, 8 insertions, 14 deletions
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<ITexture> pTexture; GLTFResourceManager::TextureAllocation CacheAllocation; float4 UVScaleBias{1, 1, 0, 0}; - std::unique_ptr<GLTFTextureUpdateData> UpdateData; }; std::vector<TextureInfo> Textures; + struct ResourceInitData; + std::unique_ptr<ResourceInitData> 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<uint32_t>& indexBuffer, - std::vector<VertexAttribs0>& vertexData0, - std::vector<VertexAttribs1>& 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 |
