1
Graphics / App crashes if more than 1 sprite used
« on: August 19, 2009, 03:13:47 am »
Hey guys.
I have no idea what's going wrong here. This is the problem:
This code causes my application to crash. If I only declare one sprite, everything works fine. But from the moment I use two or more sprites the application crashes and it can't be helped. The message I receive is as follows:
I get the same message each time.
Any ideas? I'm desperated
I have no idea what's going wrong here. This is the problem:
Code: [Select]
#include <SFML/Graphics.hpp>
using namespace sf;
int main()
{
RenderWindow App(VideoMode(800,600,32), "Test", Style::Titlebar);
App.Clear(Color(255,255,255));
Image i_one;
if( !i_one.LoadFromFile("test.png") )
return EXIT_FAILURE;
Sprite s_one(i_one);
Image i_two;
if( !i_two.LoadFromFile("test.png") )
return EXIT_FAILURE;
Sprite s_two(i_two);
App.Draw(s_one);
App.Draw(s_two);
App.Display();
Sleep(1.0f);
App.Close();
return EXIT_SUCCESS;
}
This code causes my application to crash. If I only declare one sprite, everything works fine. But from the moment I use two or more sprites the application crashes and it can't be helped. The message I receive is as follows:
Quote
Process returned -1073741819 (0xC0000005)
I get the same message each time.
Any ideas? I'm desperated