2
0

TextureViewImpl.cpp 591 B

12345678910111213141516171819202122232425
  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. {
  8. void TextureViewImpl::preInit(const TextureViewInitInfo& inf)
  9. {
  10. ANKI_ASSERT(inf.isValid());
  11. // Store some stuff
  12. m_subresource = inf;
  13. m_tex = inf.m_texture;
  14. const TextureImpl& tex = static_cast<const TextureImpl&>(*m_tex);
  15. ANKI_ASSERT(tex.isSubresourceValid(inf));
  16. m_texType = tex.computeNewTexTypeOfSubresource(inf);
  17. }
  18. } // end namespace anki