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