From f0807fc44dde14531759306317611bab87c8fccf Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 19 Oct 2020 09:13:58 +0800 Subject: +gamelab proj --- Runtime/Graphics/ImageData.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Runtime/Graphics/ImageData.h (limited to 'Runtime/Graphics/ImageData.h') 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 + +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 results; +}; + +namespace ImageDataUtil +{ + ImageData* Load(const char* path); + ImageDataRequest* LoadAsync(const char* path); + ImageDataRequest* LoadAsync(std::vector paths); +} + +#endif \ No newline at end of file -- cgit v1.1-26-g67d0