Render heightmap to layer

This commit is contained in:
2019-01-07 23:07:55 +01:00
parent 352511a920
commit 2b02be77dc
11 changed files with 145 additions and 116 deletions

View File

@@ -25,6 +25,8 @@ bool Image::load_file(std::string filename)
{
stbi_set_flip_vertically_on_load(false);
uint8_t* buffer = stbi_load(filename.c_str(), &width, &height, nullptr, 4);
if (!buffer)
return false;
comp = 4;
m_data = std::unique_ptr<uint8_t[]>(buffer);
return true;