Plasma Engine  2.0
Loading...
Searching...
No Matches
ImageDataResource.h
1#pragma once
2
3#include <GameEngine/GameEngineDLL.h>
4
5#include <Core/ResourceManager/Resource.h>
6#include <Core/World/Declarations.h>
7#include <Texture/Image/Image.h>
8
10{
11 plImage m_Image;
12
13 // plResult Serialize(plStreamWriter& stream) const;
14 // plResult Deserialize(plStreamReader& stream);
15};
16
17class PL_GAMEENGINE_DLL plImageDataResource : public plResource
18{
19 PL_ADD_DYNAMIC_REFLECTION(plImageDataResource, plResource);
20 PL_RESOURCE_DECLARE_COMMON_CODE(plImageDataResource);
21 PL_RESOURCE_DECLARE_CREATEABLE(plImageDataResource, plImageDataResourceDescriptor);
22
23public:
26
27 const plImageDataResourceDescriptor& GetDescriptor() const { return *m_pDescriptor; }
28
29private:
30 virtual plResourceLoadDesc UnloadData(Unload WhatToUnload) override;
31 virtual plResourceLoadDesc UpdateContent(plStreamReader* Stream) override;
32 virtual void UpdateMemoryUsage(MemoryUsage& out_NewMemoryUsage) override;
33
35};
36
Definition ImageDataResource.h:18
A class containing image data and associated meta data.
Definition Image.h:103
The base class for all resources.
Definition Resource.h:10
virtual plResourceLoadDesc UnloadData(Unload WhatToUnload)=0
Requests the resource to unload another quality level. If bFullUnload is true, the resource should un...
virtual plResourceLoadDesc UpdateContent(plStreamReader *pStream)=0
Called whenever more data for the resource is available. The resource must read the stream to update ...
virtual void UpdateMemoryUsage(MemoryUsage &out_NewMemoryUsage)=0
This function must be overridden by all resource types.
Interface for binary in (read) streams.
Definition Stream.h:22
A Unique ptr manages an object and destroys that object when it goes out of scope....
Definition UniquePtr.h:10
Definition ImageDataResource.h:10
Definition Resource.h:34
Describes in which loading state a resource currently is, and how many different quality levels there...
Definition Declarations.h:102