61
General / Re: a problen when making .exe with release
« on: June 24, 2012, 08:30:31 am »Global variables are evil and from time to time SFML has some problems with it, regarding loading order of graphics stuff.Global variables are also necessary in some situations, unless you want to pass things around to every function in your program.
I think what Exploiter's trying to get at though is that if you have global variables you can get things being initialized in the wrong order. This really depends a lot on just how your ImageFactory class works. If this isn't what you've done already, I would suggest making sure any actual loading of images does not occur before your main function is called. That is, don't do it in an ImageFactory constructor. Instead do it in an init() method and call that from main.