StreamingImagePoolAsset.cpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <Atom/RPI.Reflect/Image/StreamingImagePoolAsset.h>
  9. #include <AzCore/Serialization/SerializeContext.h>
  10. #include <AzCore/Asset/AssetSerializer.h>
  11. namespace AZ
  12. {
  13. namespace RPI
  14. {
  15. void StreamingImagePoolAsset::Reflect(ReflectContext* context)
  16. {
  17. if (auto* serializeContext = azrtti_cast<SerializeContext*>(context))
  18. {
  19. serializeContext->Class<StreamingImagePoolAsset, Data::AssetData>()
  20. ->Version(1)
  21. ->Field("m_poolDescriptor", &StreamingImagePoolAsset::m_poolDescriptor)
  22. ->Field("m_poolName", &StreamingImagePoolAsset::m_poolName)
  23. ;
  24. }
  25. }
  26. void StreamingImagePoolAsset::SetReady()
  27. {
  28. m_status = AssetStatus::Ready;
  29. }
  30. const RHI::StreamingImagePoolDescriptor& StreamingImagePoolAsset::GetPoolDescriptor() const
  31. {
  32. return *m_poolDescriptor;
  33. }
  34. AZStd::string_view StreamingImagePoolAsset::GetPoolName() const
  35. {
  36. return m_poolName;
  37. }
  38. }
  39. }