Radium Engine
1.5.20
Loading...
Searching...
No Matches
TextureManager.hpp
1
#pragma once
2
3
#include <Engine/RaEngine.hpp>
4
#include <map>
5
#include <string>
6
7
#include <Engine/Data/Texture.hpp>
8
#include <Engine/OpenGL.hpp>
9
namespace
Ra
{
10
namespace
Engine {
11
namespace
Data {
12
19
class
RA_ENGINE_API
TextureManager
final
20
{
21
22
private
:
23
public
:
24
using
TextureHandle = Ra::Core::Utils::Index;
25
30
TextureHandle addTexture(
const
TextureParameters
& p );
31
36
Texture
* getTexture(
const
TextureHandle& handle );
37
43
TextureHandle getTextureHandle(
const
std::string
& name );
44
46
Texture
*
getTexture
(
const
std::string
& name ) {
47
return
getTexture( getTextureHandle( name ) );
48
}
49
54
void
deleteTexture(
const
TextureHandle& handle );
55
64
static
ImageParameters
loadTextureImage(
const
std::string
& filename,
bool
linearize =
false
);
65
66
public
:
67
TextureManager
();
68
~TextureManager
();
69
TextureManager
(
TextureManager
const
& ) =
delete
;
70
TextureManager
(
TextureManager
&& ) =
delete
;
71
TextureManager
& operator=(
TextureManager
const
& ) =
delete
;
72
TextureManager
& operator=(
TextureManager
&& ) =
delete
;
73
74
private
:
75
std::vector<std::unique_ptr<Texture>
> m_textures;
76
};
77
78
}
// namespace Data
79
}
// namespace Engine
80
}
// namespace Ra
std::string
Ra::Engine::Data::TextureManager
Manage Texture loading and registration.
Definition
TextureManager.hpp:20
Ra::Engine::Data::TextureManager::getTexture
Texture * getTexture(const std::string &name)
Convinience function to obtain Texture ptr from name.
Definition
TextureManager.hpp:46
Ra::Engine::Data::Texture
Represent a Texture of the engine.
Definition
Texture.hpp:120
Ra
hepler function to manage enum as underlying types in VariableSet
Definition
Cage.cpp:3
Ra::Engine::Data::ImageParameters
Definition
Texture.hpp:40
Ra::Engine::Data::TextureParameters
Describes the sampler and image of a texture.
Definition
Texture.hpp:99
std::vector
src
Engine
Data
TextureManager.hpp
Generated by
1.12.0