2
0

TextureViewImpl.cpp 591 B

123456789101112131415161718192021222324
  1. // Copyright (C) 2009-2021, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #include <AnKi/Gr/gl/TextureViewImpl.h>
  6. namespace anki {
  7. void TextureViewImpl::preInit(const TextureViewInitInfo& inf)
  8. {
  9. ANKI_ASSERT(inf.isValid());
  10. // Store some stuff
  11. m_subresource = inf;
  12. m_tex = inf.m_texture;
  13. const TextureImpl& tex = static_cast<const TextureImpl&>(*m_tex);
  14. ANKI_ASSERT(tex.isSubresourceValid(inf));
  15. m_texType = tex.computeNewTexTypeOfSubresource(inf);
  16. }
  17. } // end namespace anki