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

Author Topic: Does one HAVE to refresh the image?  (Read 2483 times)

0 Members and 1 Guest are viewing this topic.

declan

  • Newbie
  • *
  • Posts: 34
    • View Profile
Does one HAVE to refresh the image?
« on: June 16, 2010, 09:56:03 pm »
Hi guys. If I plan on having an image just be completely static, do I have to refresh it? Right now, my code is roughly:


Code: [Select]
while(App.IsOpened()){

        App.Display();

}


But does it have to be in that while loop? Could I just display it once and have it sit there?

Thanks!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Does one HAVE to refresh the image?
« Reply #1 on: June 16, 2010, 10:05:44 pm »
You need to refresh it, because other windows may overlap yours and invalidate its contents.

But if you want to display a single static image, SFML is probably the wrong choice. It's made for real-time, dynamic stuff.
Laurent Gomila - SFML developer

Ashenwraith

  • Sr. Member
  • ****
  • Posts: 270
    • View Profile
Does one HAVE to refresh the image?
« Reply #2 on: June 16, 2010, 10:30:13 pm »
Quote from: "Laurent"
You need to refresh it, because other windows may overlap yours and invalidate its contents.

But if you want to display a single static image, SFML is probably the wrong choice. It's made for real-time, dynamic stuff.


I wonder if you create a lock mode with something like...

-Make SFML_window always on top/full screen

-Hide Cursor in window

-Move cursor to center of window and lock

declan

  • Newbie
  • *
  • Posts: 34
    • View Profile
Does one HAVE to refresh the image?
« Reply #3 on: June 16, 2010, 10:52:06 pm »
Ok, well I like SFML and I'm using it, so I'll just stick with it for now. It was more out of curiosity anyway, and I probably will want to do dynamic stuff later.