106 const std::string mPath;
108 std::unique_ptr<ImageData> mImageData;
109 std::unique_ptr<ITextureRenderResources> mGpuHandle;
Defines an abstract interface for rendering backends.
Interface for backend-specific GPU texture resource management.
bool IsOnGPU() const
Checks whether the texture is currently loaded in GPU memory.
size_t GetSizeInRAM() const
Gets the size of the texture in RAM (in bytes).
ITextureRenderResources * GetTextureRenderResources() const
Returns a pointer to the GPU texture resource interface.
~ImageDataGpu()
Destructor. Frees GPU memory if allocated.
size_t GetSizeInGPU() const
Gets the size of the texture in GPU memory (in bytes).
void UploadToGPU()
Uploads the texture data to GPU if not already uploaded.
ImageData const & GetCpuImageData() const
Returns a const reference to the CPU-side image data.
void ReleaseFromGPU()
Releases the GPU resources (image, sampler, view).
ImageDataGpu(std::string path, IRenderer *renderer)
Constructs an ImageDataGpu object from an image file path.
Represents raw 2D image data stored in memory.