mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Added graphics/ImageData class
This commit is contained in:
parent
a91fbe7166
commit
ffd3e3f852
9 changed files with 110 additions and 61 deletions
14
src/graphics/ImageData.cpp
Normal file
14
src/graphics/ImageData.cpp
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#include "ImageData.h"
|
||||
|
||||
ImageData::ImageData(ImageFormat format, uint width, uint height, void* data)
|
||||
: format(format), width(width), height(height), data(data) {
|
||||
}
|
||||
|
||||
ImageData::~ImageData() {
|
||||
switch (format) {
|
||||
case ImageFormat::rgb888:
|
||||
case ImageFormat::rgba8888:
|
||||
delete[] data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue