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
3namespace gfx
4{
5bool 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
15bool 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
bool operator==(const texture_key &key1, const texture_key &key2)
std::string id
User id.
std::vector< std::shared_ptr< texture > > textures
std::string id
User id.
backbuffer_ratio ratio
Back buffer ratio if any.
texture_info info
Texture detail info.
std::uint64_t flags
Creation flags.