From 60cbbdec07ab7a5636eac5b3c024ae44e937f4d4 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 13 Dec 2021 00:07:19 +0800 Subject: +init --- Client/Source/Graphics/ImageData.h | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Client/Source/Graphics/ImageData.h (limited to 'Client/Source/Graphics/ImageData.h') 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 + +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 -- cgit v1.1-26-g67d0