diff options
| author | chai <chaifix@163.com> | 2021-12-13 00:07:19 +0800 | 
|---|---|---|
| committer | chai <chaifix@163.com> | 2021-12-13 00:07:19 +0800 | 
| commit | 60cbbdec07ab7a5636eac5b3c024ae44e937f4d4 (patch) | |
| tree | b2c7b0a868f18159dbc43d8954e1bd7668549a88 /Client/Source/Graphics/ImageData.h | |
+init
Diffstat (limited to 'Client/Source/Graphics/ImageData.h')
| -rw-r--r-- | Client/Source/Graphics/ImageData.h | 39 | 
1 files changed, 39 insertions, 0 deletions
| diff --git a/Client/Source/Graphics/ImageData.h b/Client/Source/Graphics/ImageData.h new file mode 100644 index 0000000..9ebc738 --- /dev/null +++ b/Client/Source/Graphics/ImageData.h @@ -0,0 +1,39 @@ +#ifndef IMAGE_DATA_H +#define IMAGE_DATA_H + +#include <vector> + +enum EPixelFormat +{ +	PixelFormat_RGBA, +	PixelFormat_RGB, +	PixelFormat_R, +	PixelFormat_RG, +	PixelFormat_BGR, +	PixelFormat_BGRA +}; + +enum EPixelElementType +{ +	PixelType_UNSIGNED_BYTE, +	PixelType_UNSIGNED_INT, +	PixelType_BYTE, +	PixelType_INT, +	PixelType_FLOAT, +}; + +// 图片像素数据 +class ImageData +{ +public: +    ImageData()  +    { +    } + +    void* pixels; // 像素数据,格式和类型参考 http://docs.gl/gl3/glTexImage2D pixel data的format和type +    EPixelFormat format; +    EPixelElementType type; +    int width, height; +}; + +#endif
\ No newline at end of file | 
