I use sfml 1.6 and ubuntu ... i knew what the code snippet was for but i 'd forgotten to add it ..when i saw the wrong placement of the sprite i added it and the problem was fixed but i don't know why ... A complete and simple example in which the same "problem" appears
int main()
{
// Create the main rendering window
sf::RenderWindow main_win;
main_win.Create(sf::VideoMode(1280,1024, 32), "Example");
sf::Image s;
if(s.LoadFromFile("src/images/game_start.png") != true)
std::cerr<<"could not open image";
sf::Sprite game_start;
game_start.SetImage(s);
game_start.SetPosition(0.f, 0.f);
sf::Event currentEvent;
while(main_win.IsOpened())
{
while (main_win.GetEvent(currentEvent))
{
if (currentEvent.Type == sf::Event::Closed)
main_win.Close();
}
main_win.Clear(sf::Color(255,0,0));
main_win.Draw(game_start);
main_win.Display();
}
return EXIT_SUCCESS;
}