1 | //************************************ bs::framework - Copyright 2018 Marko Pintera **************************************// |
---|---|
2 | //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// |
3 | #include "RenderAPI/BsTextureView.h" |
4 | #include "Image/BsTexture.h" |
5 | |
6 | namespace bs { namespace ct |
7 | { |
8 | size_t TextureView::HashFunction::operator()(const TEXTURE_VIEW_DESC &key) const |
9 | { |
10 | size_t seed = 0; |
11 | bs_hash_combine(seed, key.mostDetailMip); |
12 | bs_hash_combine(seed, key.numMips); |
13 | bs_hash_combine(seed, key.firstArraySlice); |
14 | bs_hash_combine(seed, key.numArraySlices); |
15 | bs_hash_combine(seed, key.usage); |
16 | |
17 | return seed; |
18 | } |
19 | |
20 | bool TextureView::EqualFunction::operator() |
21 | (const TEXTURE_VIEW_DESC &a, const TEXTURE_VIEW_DESC &b) const |
22 | { |
23 | return a.mostDetailMip == b.mostDetailMip && a.numMips == b.numMips |
24 | && a.firstArraySlice == b.firstArraySlice && a.numArraySlices == b.numArraySlices && a.usage == b.usage; |
25 | } |
26 | |
27 | TextureView::TextureView(const TEXTURE_VIEW_DESC& desc) |
28 | :mDesc(desc) |
29 | { |
30 | |
31 | } |
32 | }} |