constructor in the sf::image class? Would be nice to have in my opinion.
Title: Re: sf::image constructor that allows to initialize an imagefile
Post by: Nexus on December 27, 2013, 02:36:20 pm
Yes, such a constructor has two disadvantages:
It is less expressive and possibly ambiguous (consider sf::Shader which can be loaded from a file or from a string), thus one should consider the named constructor idiom.
SFML 2 doesn't use exceptions, so there is no way to report errors.