SleakEngine
0.1.0
C++23 multi-backend game engine
Toggle main menu visibility
Loading...
Searching...
No Matches
ResourceBase.hpp
Go to the documentation of this file.
1
#ifndef _RESOURCEBASE_HPP_
2
#define _RESOURCEBASE_HPP_
3
4
#include <
Core/OSDef.hpp
>
5
#include <string>
6
7
namespace
Sleak
{
8
9
/// Common lifecycle contract for GPU-backed resources: init, per-frame update, teardown.
10
class
ENGINE_API
ResourceBase
{
11
public
:
12
virtual
~ResourceBase
() =
default
;
13
/// Allocates backend resources from backend-specific creation parameters.
14
virtual
bool
Initialize
(
void
* Data) = 0;
15
virtual
void
Update
() = 0;
16
virtual
void
Cleanup
() = 0;
17
protected
:
18
std::string
Name
;
19
bool
bIsInitialized
;
20
};
21
22
}
23
24
#endif
OSDef.hpp
Sleak::ResourceBase
Common lifecycle contract for GPU-backed resources: init, per-frame update, teardown.
Definition
ResourceBase.hpp:10
Sleak::ResourceBase::Update
virtual void Update()=0
Sleak::ResourceBase::Cleanup
virtual void Cleanup()=0
Sleak::ResourceBase::bIsInitialized
bool bIsInitialized
Definition
ResourceBase.hpp:19
Sleak::ResourceBase::Name
std::string Name
Definition
ResourceBase.hpp:18
Sleak::ResourceBase::~ResourceBase
virtual ~ResourceBase()=default
Sleak::ResourceBase::Initialize
virtual bool Initialize(void *Data)=0
Allocates backend resources from backend-specific creation parameters.
Sleak
Root namespace for everything the engine exposes.
Definition
Camera.hpp:10
include
private
Graphics
Common
ResourceBase.hpp
Generated on
for SleakEngine by
1.18.0