From 967f2dc21a045de770cb0e7898ed5fab6a3265fa Mon Sep 17 00:00:00 2001 From: assiduous Date: Sun, 13 Dec 2020 20:21:57 -0800 Subject: GLTFLoader: added convenience constructor for Model::CreateInfo --- AssetLoader/interface/GLTFLoader.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'AssetLoader/interface') diff --git a/AssetLoader/interface/GLTFLoader.hpp b/AssetLoader/interface/GLTFLoader.hpp index 91f4aef..05c9c12 100644 --- a/AssetLoader/interface/GLTFLoader.hpp +++ b/AssetLoader/interface/GLTFLoader.hpp @@ -352,6 +352,21 @@ struct Model /// Whether to load animation and initialize skin attributes /// buffer. bool LoadAnimationAndSkin = true; + + CreateInfo() = default; + + explicit CreateInfo(const char* _FileName, + TextureCacheType* _pTextureCache = nullptr, + ResourceCacheUseInfo* _pCacheInfo = nullptr, + bool _LoadAnimationAndSkin = true) : + // clang-format off + FileName {_FileName}, + pTextureCache {_pTextureCache}, + pCacheInfo {_pCacheInfo}, + LoadAnimationAndSkin{_LoadAnimationAndSkin} + // clang-format on + { + } }; Model(IRenderDevice* pDevice, IDeviceContext* pContext, -- cgit v1.2.3