| 1234567891011121314151617181920212223242526272829303132333435 |
- //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
- //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
- #include "RenderAPI/BsTextureView.h"
- #include "Image/BsTexture.h"
- namespace bs { namespace ct
- {
- size_t TextureView::HashFunction::operator()(const TEXTURE_VIEW_DESC &key) const
- {
- size_t seed = 0;
- hash_combine(seed, key.mostDetailMip);
- hash_combine(seed, key.numMips);
- hash_combine(seed, key.firstArraySlice);
- hash_combine(seed, key.numArraySlices);
- hash_combine(seed, key.usage);
- return seed;
- }
- bool TextureView::EqualFunction::operator()
- (const TEXTURE_VIEW_DESC &a, const TEXTURE_VIEW_DESC &b) const
- {
- return a.mostDetailMip == b.mostDetailMip && a.numMips == b.numMips
- && a.firstArraySlice == b.firstArraySlice && a.numArraySlices == b.numArraySlices && a.usage == b.usage;
- }
- TextureView::~TextureView()
- { }
- TextureView::TextureView(const TEXTURE_VIEW_DESC& desc)
- :mDesc(desc)
- {
- }
- }}
|