LeviLamina
Loading...
Searching...
No Matches
ImageDescription.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core_graphics/ImageType.h"
7#include "mc/deps/core_graphics/enums/ColorSpace.h"
8#include "mc/deps/core_graphics/enums/TextureFormat.h"
9
10// auto generated forward declare list
11#include "mc/deps/core_graphics/ImageType.h"
12#include "mc/deps/core_graphics/enums/ColorSpace.h"
13
14// clang-format off
15namespace mce { struct Image; }
16// clang-format on
17
18namespace cg {
19
20struct ImageDescription {
21 ImageDescription();
22 ImageDescription(
23 uint32 width,
24 uint32 height,
25 mce::TextureFormat format,
26 cg::ColorSpace colorSpace,
27 cg::ImageType imageType,
28 uint32 arraySizeOrDepth
29 );
30 explicit ImageDescription(const mce::Image& image);
31 ImageDescription(const ImageDescription&) = default;
32 ImageDescription& operator=(const ImageDescription&) = default;
33
34 bool operator!=(const ImageDescription& rhs) const;
35 bool operator==(const ImageDescription& rhs) const { return !(*this != rhs); }
36
37
38 void setArraySize(uint32 size);
39 [[nodiscard]] uint32 getArraySize() const;
40 [[nodiscard]] uint32 getDepth() const;
41 [[nodiscard]] uint32 getSubimageSize() const;
42 [[nodiscard]] uint64 getStorageSize() const;
43
44 static uint32 getStrideFromFormat(mce::TextureFormat fmt);
45
46 uint32 mWidth{0};
47 uint32 mHeight{0};
48 mce::TextureFormat mTextureFormat;
49 cg::ColorSpace mColorSpace{cg::ColorSpace::Unknown};
50 cg::ImageType mImageType{cg::ImageType::Texture2D};
51
52private:
53 uint32 mArraySizeOrDepth{1};
54};
55
56} // namespace cg
Definition Image.h:12