Unravel Engine C++ Reference
Loading...
Searching...
No Matches
render_view_keys.cpp
Go to the documentation of this file.
1
#include "
render_view_keys.h
"
2
3
namespace
gfx
4
{
5
bool
operator==
(
const
texture_key
& key1,
const
texture_key
& key2)
6
{
7
return
key1.
id
== key2.
id
&& key1.
flags
== key2.
flags
&& key1.
ratio
== key2.
ratio
&&
8
key1.
info
.format == key2.
info
.format && key1.
info
.storageSize == key2.
info
.storageSize &&
9
key1.
info
.width == key2.
info
.width && key1.
info
.height == key2.
info
.height &&
10
key1.
info
.depth == key2.
info
.depth && key1.
info
.numMips == key2.
info
.numMips &&
11
key1.
info
.numLayers == key2.
info
.numLayers && key1.
info
.bitsPerPixel == key2.
info
.bitsPerPixel &&
12
key1.
info
.cubeMap == key2.
info
.cubeMap;
13
}
14
15
bool
operator==
(
const
fbo_key
& key1,
const
fbo_key
& key2)
16
{
17
bool
result = key1.
id
== key2.
id
&& key1.
textures
.size() == key2.
textures
.size();
18
if
(!result)
19
{
20
return
false
;
21
}
22
23
std::size_t tex_count = key1.
textures
.size();
24
for
(std::size_t i = 0; i < tex_count; ++i)
25
{
26
if
(key1.
textures
[i] != key2.
textures
[i])
27
{
28
return
false
;
29
}
30
}
31
32
// Identical
33
return
true
;
34
}
35
}
// namespace gfx
gfx
Definition
debugdraw.cpp:7
gfx::operator==
bool operator==(const texture_key &key1, const texture_key &key2)
Definition
render_view_keys.cpp:5
render_view_keys.h
gfx::fbo_key
Definition
render_view_keys.h:25
gfx::fbo_key::id
std::string id
User id.
Definition
render_view_keys.h:27
gfx::fbo_key::textures
std::vector< std::shared_ptr< texture > > textures
Definition
render_view_keys.h:29
gfx::texture_key
Definition
render_view_keys.h:13
gfx::texture_key::id
std::string id
User id.
Definition
render_view_keys.h:15
gfx::texture_key::ratio
backbuffer_ratio ratio
Back buffer ratio if any.
Definition
render_view_keys.h:21
gfx::texture_key::info
texture_info info
Texture detail info.
Definition
render_view_keys.h:17
gfx::texture_key::flags
std::uint64_t flags
Creation flags.
Definition
render_view_keys.h:19
UnravelEngine
UnravelEngine
engine
core
graphics
render_view_keys.cpp
Generated by
1.12.0