Render heightmap to layer
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user