SFML community forums

Help => General => Topic started by: declan on June 16, 2010, 09:56:03 pm

Title: Does one HAVE to refresh the image?
Post by: declan 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!
Title: Does one HAVE to refresh the image?
Post by: Laurent 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.
Title: Does one HAVE to refresh the image?
Post by: Ashenwraith 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
Title: Does one HAVE to refresh the image?
Post by: declan 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.