diff options
author | chai <chaifix@163.com> | 2020-10-19 09:13:58 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-10-19 09:13:58 +0800 |
commit | f0807fc44dde14531759306317611bab87c8fccf (patch) | |
tree | 6e78fed61c16a70cda5fa732635f89f9faac9720 /Runtime/Graphics/ImageData.h | |
parent | 639b34294ffc20721c66db46e59e07d9100ac4b8 (diff) |
+gamelab proj
Diffstat (limited to 'Runtime/Graphics/ImageData.h')
-rw-r--r-- | Runtime/Graphics/ImageData.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Runtime/Graphics/ImageData.h b/Runtime/Graphics/ImageData.h new file mode 100644 index 0000000..cd56e83 --- /dev/null +++ b/Runtime/Graphics/ImageData.h @@ -0,0 +1,43 @@ +#ifndef IMAGE_DATA_H +#define IMAGE_DATA_H + +#include <vector> + +class ImageData +{ +public: + enum ImageFormat + { + ImageFormat_Rgba_Int, + ImageFormat_Rgba_Float, + }; + +private: + void* m_Data; + +}; + +enum ImageDataAsyncError +{ + ImageDataAsyncError_NoFile = 1, + ImageDataAsyncError_ParseFailed = 2, + ImageDataAsyncError_InvalidFormat = 3, +}; + +struct ImageDataRequest +{ + bool isDone, hasError; + int error; + int progress, all; + ImageData* result; + std::vector<ImageData*> results; +}; + +namespace ImageDataUtil +{ + ImageData* Load(const char* path); + ImageDataRequest* LoadAsync(const char* path); + ImageDataRequest* LoadAsync(std::vector<const char*> paths); +} + +#endif
\ No newline at end of file |