CmPixelData.cpp 848 B

12345678910111213141516171819202122232425262728293031323334
  1. #include "CmPixelData.h"
  2. #include "CmPixelUtil.h"
  3. #include "CmPixelDataRTTI.h"
  4. namespace CamelotFramework
  5. {
  6. PixelData::PixelData(const PixelData& copy)
  7. :GpuResourceData(copy)
  8. {
  9. mFormat = copy.mFormat;
  10. mRowPitch = copy.mRowPitch;
  11. mSlicePitch = copy.mSlicePitch;
  12. mExtents = copy.mExtents;
  13. }
  14. UINT32 PixelData::getInternalBufferSize()
  15. {
  16. return PixelUtil::getMemorySize(getWidth(), getHeight(), getDepth(), getFormat());
  17. }
  18. /************************************************************************/
  19. /* SERIALIZATION */
  20. /************************************************************************/
  21. RTTITypeBase* PixelData::getRTTIStatic()
  22. {
  23. return PixelDataRTTI::instance();
  24. }
  25. RTTITypeBase* PixelData::getRTTI() const
  26. {
  27. return PixelData::getRTTIStatic();
  28. }
  29. }