restruct codes for TextureManager
This commit is contained in:
@@ -15,11 +15,15 @@ class Texture
|
||||
{
|
||||
protected:
|
||||
|
||||
TextureManager *manager;
|
||||
|
||||
VkDevice device;
|
||||
TextureData *data;
|
||||
|
||||
public:
|
||||
|
||||
TextureManager * GetManager () {return manager;}
|
||||
|
||||
TextureData * GetData () {return data;}
|
||||
|
||||
VkDeviceMemory GetDeviceMemory () {return data?(data->memory?data->memory->operator VkDeviceMemory():VK_NULL_HANDLE):VK_NULL_HANDLE;}
|
||||
@@ -40,9 +44,9 @@ public:
|
||||
|
||||
public:
|
||||
|
||||
Texture(VkDevice dev,TextureData *td)
|
||||
Texture(TextureManager *tm,TextureData *td)
|
||||
{
|
||||
device=dev;
|
||||
manager=tm;
|
||||
data=td;
|
||||
}
|
||||
|
||||
@@ -95,7 +99,7 @@ class TextureCube:public Texture
|
||||
{
|
||||
public:
|
||||
|
||||
TextureCube(VkDevice dev,TextureData *td):Texture(dev,td){}
|
||||
using Texture::Texture;
|
||||
~TextureCube()=default;
|
||||
|
||||
static VkImageViewType GetImageViewType(){return VK_IMAGE_VIEW_TYPE_CUBE;}
|
||||
|
Reference in New Issue
Block a user