Lugdunum
0.1.0
include
lug
Graphics
Render
Texture.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
lug/Graphics/Export.hpp
>
4
#include <
lug/Graphics/Resource.hpp
>
5
6
namespace
lug
{
7
namespace
Graphics {
8
9
// For friend
10
namespace
Builder {
11
class
Texture;
12
}
// Builder
13
14
namespace
Render {
15
16
class
LUG_GRAPHICS_API
Texture
:
public
Resource
{
17
friend
class ::lug::Graphics::Builder::Texture;
18
19
public
:
20
enum class
Filter
: uint8_t {
21
Nearest,
22
Linear
23
};
24
25
enum class
WrappingMode
: uint8_t {
26
ClampToEdge,
27
MirroredRepeat,
28
Repeat
29
};
30
31
enum class
Format
: uint8_t {
32
Undefined,
33
R8G8B8A8_UNORM,
34
R16G16_SFLOAT,
35
R16G16B16_SFLOAT,
36
R32G32B32A32_SFLOAT
37
};
38
39
public
:
40
Texture
(
const
std::string& name);
41
42
Texture
(
const
Texture
&) =
delete
;
43
Texture
(
Texture
&&) =
delete
;
44
45
Texture
& operator=(
const
Texture
&) =
delete
;
46
Texture
& operator=(
Texture
&&) =
delete
;
47
48
virtual
~
Texture
() =
default
;
49
50
uint32_t getWidth()
const
;
51
uint32_t getHeight()
const
;
52
Render::Texture::Format
getFormat()
const
;
53
54
Render::Texture::Filter
getMagFilter()
const
;
55
Render::Texture::Filter
getMinFilter()
const
;
56
Render::Texture::Filter
getMipMapFilter()
const
;
57
Render::Texture::WrappingMode
getWrapS()
const
;
58
Render::Texture::WrappingMode
getWrapT()
const
;
59
60
static
size_t
formatToSize(
Render::Texture::Format
format);
61
62
private
:
63
uint32_t _width{0};
64
uint32_t _height{0};
65
Render::Texture::Format
_format
;
66
67
Render::Texture::Filter
_magFilter
;
68
Render::Texture::Filter
_minFilter
;
69
Render::Texture::Filter
_mipMapFilter
;
70
71
Render::Texture::WrappingMode
_wrapS
;
72
Render::Texture::WrappingMode
_wrapT
;
73
};
74
75
#include <
lug/Graphics/Render/Texture.inl
>
76
77
}
// Render
78
}
// Graphics
79
}
// lug
lug::Graphics::Render::Texture::_format
Render::Texture::Format _format
Definition:
Texture.hpp:65
lug::Graphics::Render::Texture
Definition:
Texture.hpp:16
LUG_GRAPHICS_API
#define LUG_GRAPHICS_API
Definition:
Export.hpp:11
lug::Graphics::Render::Texture::_wrapT
Render::Texture::WrappingMode _wrapT
Definition:
Texture.hpp:72
Resource.hpp
lug::Graphics::Render::Texture::Filter
Filter
Definition:
Texture.hpp:20
lug::Graphics::Render::Texture::_wrapS
Render::Texture::WrappingMode _wrapS
Definition:
Texture.hpp:71
lug::Graphics::Render::Texture::WrappingMode
WrappingMode
Definition:
Texture.hpp:25
lug::Graphics::Resource
Class for resource.
Definition:
Resource.hpp:17
lug
Definition:
Application.hpp:11
lug::Graphics::Render::Texture::Format
Format
Definition:
Texture.hpp:31
lug::Graphics::Render::Texture::_mipMapFilter
Render::Texture::Filter _mipMapFilter
Definition:
Texture.hpp:69
Texture.inl
lug::Graphics::Render::Texture::_magFilter
Render::Texture::Filter _magFilter
Definition:
Texture.hpp:67
lug::Graphics::Render::Texture::_minFilter
Render::Texture::Filter _minFilter
Definition:
Texture.hpp:68
Export.hpp
Generated by
1.8.13