3
0

StreamingImagePoolAsset.cpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. const char* StreamingImagePoolAsset::DisplayName = "StreamingImagePool";
  16. const char* StreamingImagePoolAsset::Group = "Image";
  17. const char* StreamingImagePoolAsset::Extension = "streamingimagepool";
  18. void StreamingImagePoolAsset::Reflect(ReflectContext* context)
  19. {
  20. if (auto* serializeContext = azrtti_cast<SerializeContext*>(context))
  21. {
  22. serializeContext->Class<StreamingImagePoolAsset, Data::AssetData>()
  23. ->Version(1)
  24. ->Field("m_poolDescriptor", &StreamingImagePoolAsset::m_poolDescriptor)
  25. ->Field("m_poolName", &StreamingImagePoolAsset::m_poolName)
  26. ;
  27. }
  28. }
  29. void StreamingImagePoolAsset::SetReady()
  30. {
  31. m_status = AssetStatus::Ready;
  32. }
  33. const RHI::StreamingImagePoolDescriptor& StreamingImagePoolAsset::GetPoolDescriptor() const
  34. {
  35. return *m_poolDescriptor;
  36. }
  37. AZStd::string_view StreamingImagePoolAsset::GetPoolName() const
  38. {
  39. return m_poolName;
  40. }
  41. }
  42. }