diff options
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 |