Initial commit: Final state of the master project

This commit is contained in:
2017-09-16 09:41:37 +02:00
commit 696180d43b
832 changed files with 169717 additions and 0 deletions

33
Research/scene/PNG.cpp Normal file
View File

@@ -0,0 +1,33 @@
#include "../inc/lodepng/lodepng.h"
#include "PNG.h"
PNG::PNG(const char* png_file_path) {
mWidth = 0;
mHeight = 0;
unsigned error = lodepng::decode(mImage, mWidth, mHeight, png_file_path);
if (error)
lodepng_error_text(error);
}
PNG::~PNG() {
mImage.clear();
}
bool PNG::Initialized() {
return mWidth > 0 && mHeight > 0;
}
unsigned char* PNG::Data() {
return &mImage[0];
}
unsigned PNG::W() {
return mWidth;
}
unsigned PNG::H() {
return mHeight;
}