Removed error dialog when texture file does not exist

This commit is contained in:
Enrico Turri 2018-06-21 09:54:43 +02:00
parent f8bbfad152
commit b386f52acc

View file

@ -4,6 +4,8 @@
#include <wx/image.h>
#include <boost/filesystem.hpp>
#include <vector>
#include <algorithm>
@ -27,6 +29,9 @@ bool GLTexture::load_from_file(const std::string& filename, bool generate_mipmap
{
reset();
if (!boost::filesystem::exists(filename))
return false;
// Load a PNG with an alpha channel.
wxImage image;
if (!image.LoadFile(filename, wxBITMAP_TYPE_PNG))