blob: 9ebc738fc5f93e10dd8fdb9fa5f1c83e0a1643a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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
|