Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - jimboTL60

Pages: [1]
1
Graphics / sf Variable declaration outside the main
« on: July 08, 2009, 03:02:28 am »
Hi,

When I declare my image and sprite variables outside of the main function, any access to the sprites crashes the program, but it works fine if the variables are declared inside the main. Why is it that way and what if I really need global stuff?

This doesn't affect myimage.LoadFromFile(myfilename). I also can declare my sf::Event variables outside without problem.

Edit: I get the same crashing problem with rendering windows declared outside the main.

Pages: [1]