Added graphics/ImageData class

This commit is contained in:
MihailRis
2023-11-12 03:26:06 +03:00
parent a91fbe7166
commit ffd3e3f852
9 changed files with 110 additions and 61 deletions
+37
View File
@@ -0,0 +1,37 @@
#ifndef GRAPHICS_IMAGE_DATA_H_
#define GRAPHICS_IMAGE_DATA_H_
#include "../typedefs.h"
enum class ImageFormat {
rgb888,
rgba8888
};
class ImageData {
ImageFormat format;
uint width;
uint height;
void* data;
public:
ImageData(ImageFormat format, uint width, uint height, void* data);
~ImageData();
void* getData() const {
return data;
}
ImageFormat getFormat() const {
return format;
}
uint getWidth() const {
return width;
}
uint getHeight() const {
return height;
}
};
#endif // GRAPHICS_IMAGE_DATA_H_