Sampler.cpp 835 B

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright (C) 2009-2016, 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/Sampler.h>
  6. #include <anki/gr/vulkan/SamplerImpl.h>
  7. namespace anki
  8. {
  9. //==============================================================================
  10. Sampler::Sampler(GrManager* manager, U64 hash)
  11. : GrObject(manager, CLASS_TYPE, hash)
  12. {
  13. }
  14. //==============================================================================
  15. Sampler::~Sampler()
  16. {
  17. }
  18. //==============================================================================
  19. void Sampler::init(const SamplerInitInfo& init)
  20. {
  21. m_impl.reset(getAllocator().newInstance<SamplerImpl>(&getManager()));
  22. if(m_impl->init(init))
  23. {
  24. ANKI_LOGF("Cannot recover");
  25. }
  26. }
  27. } // end namespace anki