add file picking for osx and ios and implement equirectangular import
This commit is contained in:
@@ -23,6 +23,15 @@ bool Image::load(std::string filename)
|
||||
return true;
|
||||
}
|
||||
|
||||
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);
|
||||
comp = 4;
|
||||
m_data = std::unique_ptr<uint8_t[]>(buffer);
|
||||
return true;
|
||||
}
|
||||
|
||||
void Image::flip()
|
||||
{
|
||||
auto flipped = std::make_unique<uint8_t[]>(width*height*4);
|
||||
|
||||
Reference in New Issue
Block a user