moved LoadTexture2D/CreateTexture2DArray/LoadTextureCube to TextureManager from VKRenderResource

This commit is contained in:
2024-11-05 23:02:38 +08:00
parent f6cc1ee619
commit 88f5948a2e
4 changed files with 97 additions and 98 deletions

View File

@@ -50,7 +50,7 @@ class RenderResource
ShaderModuleMapByName shader_module_by_name[VK_SHADER_STAGE_TYPE_COUNT];
Map<AnsiString,Material *> material_by_name;
Map<OSString,Texture *> texture_by_name;
//Map<OSString,Texture *> texture_by_name;
IDObjectManage<MaterialID, Material> rm_material; ///<材质合集
IDObjectManage<MaterialInstanceID, MaterialInstance> rm_material_instance; ///<材质实例合集
@@ -157,14 +157,6 @@ public: //Material
Sampler * CreateSampler(VkSamplerCreateInfo *sci=nullptr);
Sampler * CreateSampler(Texture *);
public: //texture
Texture2D * LoadTexture2D(const OSString &,bool auto_mipmaps=false);
TextureCube * LoadTextureCube(const OSString &,bool auto_mipmaps=false);
Texture2DArray * CreateTexture2DArray(const AnsiString &name,const uint32_t width,const uint32_t height,const uint32_t layer,const VkFormat &fmt,bool auto_mipmaps=false);
bool LoadTexture2DToArray(Texture2DArray *,const uint32_t layer,const OSString &);
public: //Get
Material * GetMaterial (const MaterialID &id){return rm_material.Get(id);}