base setup for osx in place

This commit is contained in:
Omar Mohamed Ali Mudhir
2017-01-14 18:30:19 +00:00
commit 13d8e6e563
18 changed files with 1143 additions and 0 deletions

13
engine/image.cpp Normal file
View File

@@ -0,0 +1,13 @@
#include "pch.h"
#include "image.hpp"
#define STB_IMAGE_IMPLEMENTATION
#include <stb/stb_image.h>
bool Image::load(std::string filename)
{
stbi_set_flip_vertically_on_load(true);
uint8_t* buffer = stbi_load(filename.c_str(), &width, &height, &comp, 0);
m_data = std::unique_ptr<uint8_t[]>(buffer);
return true;
}