Renderer/Texture: Implement Update of a region + inherit AbstractImage

This commit is contained in:
Jérôme Leclercq
2021-09-07 18:42:53 +02:00
parent b6745b2906
commit 879b2f7aa6
11 changed files with 122 additions and 73 deletions

View File

@@ -46,7 +46,7 @@ namespace Nz
using TextureLoader = ResourceLoader<Texture, TextureParams>;
using TextureManager = ResourceManager<Texture, TextureParams>;
class NAZARA_RENDERER_API Texture : public Resource
class NAZARA_RENDERER_API Texture : public AbstractImage, public Resource, public std::enable_shared_from_this<Texture> //< FIXME
{
public:
Texture() = default;
@@ -59,8 +59,6 @@ namespace Nz
virtual Vector3ui GetSize(UInt8 level = 0) const = 0;
virtual ImageType GetType() const = 0;
virtual bool Update(const void* ptr) = 0;
static inline unsigned int GetLevelSize(unsigned int size, unsigned int level);
static std::shared_ptr<Texture> CreateFromImage(const Image& image, const TextureParams& params);