3
0

ImageAsset.cpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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/ImageAsset.h>
  9. #include <AzCore/Serialization/SerializeContext.h>
  10. namespace AZ
  11. {
  12. namespace RPI
  13. {
  14. const char* ImageAsset::DisplayName = "ImageAsset";
  15. const char* ImageAsset::Group = "Image";
  16. const char* ImageAsset::Extension = "image";
  17. void ImageAsset::Reflect(AZ::ReflectContext* context)
  18. {
  19. if (auto* serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
  20. {
  21. serializeContext->Class<ImageAsset, Data::AssetData>()
  22. ->Field("m_imageDescriptor", &ImageAsset::m_imageDescriptor)
  23. ->Field("m_imageViewDescriptor", &ImageAsset::m_imageViewDescriptor)
  24. ;
  25. }
  26. }
  27. ImageAsset::~ImageAsset()
  28. {
  29. }
  30. const RHI::ImageDescriptor& ImageAsset::GetImageDescriptor() const
  31. {
  32. return m_imageDescriptor;
  33. }
  34. const RHI::ImageViewDescriptor& ImageAsset::GetImageViewDescriptor() const
  35. {
  36. return m_imageViewDescriptor;
  37. }
  38. void ImageAsset::SetReady()
  39. {
  40. m_status = AssetStatus::Ready;
  41. }
  42. }
  43. }