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

Author Topic: sf::RenderWindow::Clear() problem  (Read 863 times)

0 Members and 1 Guest are viewing this topic.

Venom_Z

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
sf::RenderWindow::Clear() problem
« on: August 10, 2011, 04:28:11 pm »
Hello. I just started out using the SFML package and I must say it really is charming even if it was a b*tch to setup. But I have now run into a problem I can't solve on my own.

The function "sf::RenderWindow::Clear()" refuses to work properly. I read about some error occuring when you try to clear the screen without anything on it. Therefore I tried to add a sprite to the screen before I ran it the first time, I had however the same result.

What happens is that once it comes to the function the window simply stops responding.

Im running Visual studio 2010 on Windows 7. I also use dual monitor if that could be causing any issues.

Would appreciate some help with this.

Also, even if I have the Event handler to close (App.Close()) the application when "Event.Type == sf::Event::Closed" I get an error message and a crash. Could this be windows b*tching? This is a minor problem tho. First thing first.

Thank you.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
sf::RenderWindow::Clear() problem
« Reply #1 on: August 10, 2011, 06:01:01 pm »
You must recompile SFML, the VC++ 2008 libraries are not compatible with VC++ 2010.
Laurent Gomila - SFML developer

Venom_Z

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
sf::RenderWindow::Clear() problem
« Reply #2 on: August 10, 2011, 06:26:44 pm »
Quote from: "Laurent"
You must recompile SFML, the VC++ 2008 libraries are not compatible with VC++ 2010.


How do I do this?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
sf::RenderWindow::Clear() problem
« Reply #3 on: August 10, 2011, 06:34:25 pm »
You open SFML.sln, follow the conversion wizard, and click "build all".

The conversion might not be perfect, but half of the threads on this forum are about this issue so I think that you'll find all the additional information that you need ;)

Someone even posted a video tutorial, if I remember correctly.
Laurent Gomila - SFML developer