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

Author Topic: Show FPS In Title Bar Window  (Read 8372 times)

0 Members and 1 Guest are viewing this topic.

Auron

  • Newbie
  • *
  • Posts: 15
    • MSN Messenger - videogamefreak101@hotmail.com
    • View Profile
Show FPS In Title Bar Window
« on: August 05, 2009, 04:27:33 am »
Hey Guys,

I was wondering if there was a way to show the FPS or Framerate in the title bar of the window? I've seen it done in other libraries and engines, but I have just started using SFML. Any exmaples, please?

klusark

  • Newbie
  • *
  • Posts: 45
    • View Profile
Show FPS In Title Bar Window
« Reply #1 on: August 05, 2009, 06:15:05 am »
There currently is no way to change the window title.

Auron

  • Newbie
  • *
  • Posts: 15
    • MSN Messenger - videogamefreak101@hotmail.com
    • View Profile
Show FPS In Title Bar Window
« Reply #2 on: August 05, 2009, 07:16:54 am »
So you're saying that you can't display the framerate or FPS in the title bar window. Only the name of the window.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Show FPS In Title Bar Window
« Reply #3 on: August 05, 2009, 07:49:28 am »
Once you've created the window you can't change its title.

If you want to quickly display the current FPS you can use FRAPS.
Laurent Gomila - SFML developer

Auron

  • Newbie
  • *
  • Posts: 15
    • MSN Messenger - videogamefreak101@hotmail.com
    • View Profile
Show FPS In Title Bar Window
« Reply #4 on: August 05, 2009, 05:49:26 pm »
Ah, ok, thanks.

Astrof

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Show FPS In Title Bar Window
« Reply #5 on: August 05, 2009, 09:32:55 pm »
Or if you really want to you can get the window handle and change the title yourself...but that would require work.

Auron

  • Newbie
  • *
  • Posts: 15
    • MSN Messenger - videogamefreak101@hotmail.com
    • View Profile
Show FPS In Title Bar Window
« Reply #6 on: August 06, 2009, 05:27:56 am »
I just wanted to display the FPS in the title bar, but if there's not a lot that can be done about, then its no biggie.

Sirt

  • Newbie
  • *
  • Posts: 27
    • View Profile
Show FPS In Title Bar Window
« Reply #7 on: August 24, 2009, 08:20:43 am »
It sounds like a neat idea though having an fps counter in the titlebar.

You could create an sf::RenderWindow without a titlebar,
then blit your image of a titlebar to the top of the screen every frame while also outputing an sf::String anywhere in that titlebar.

(just a thought).

klusark

  • Newbie
  • *
  • Posts: 45
    • View Profile
Show FPS In Title Bar Window
« Reply #8 on: August 24, 2009, 11:28:42 pm »
Quote from: "Sirt"
It sounds like a neat idea though having an fps counter in the titlebar.

You could create an sf::RenderWindow without a titlebar,
then blit your image of a titlebar to the top of the screen every frame while also outputing an sf::String anywhere in that titlebar.

(just a thought).


That would only work for one platform. Imagine running a program on linux and having the windows xp titlebar showing up.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Show FPS In Title Bar Window
« Reply #9 on: August 25, 2009, 08:00:42 am »
You can have a style sheet file to do the job.
SFML / OS X developer

e_barroga

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Show FPS In Title Bar Window
« Reply #10 on: August 31, 2009, 07:48:42 am »
Quote from: "Laurent"
Once you've created the window you can't change its title.

If you want to quickly display the current FPS you can use FRAPS.


Will there be a future method to change the title? If not, why?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Show FPS In Title Bar Window
« Reply #11 on: August 31, 2009, 08:20:25 am »
Quote
Will there be a future method to change the title?

I still don't know ;)
Laurent Gomila - SFML developer

Auron

  • Newbie
  • *
  • Posts: 15
    • MSN Messenger - videogamefreak101@hotmail.com
    • View Profile
Show FPS In Title Bar Window
« Reply #12 on: September 28, 2009, 07:58:21 am »
Wow, I'm surpirsed this thread still kept going. I haven't used SFML in awhile, and forgot, well pretty much everything. Although I'm now thinking of starting up again.

 

anything