FPS?

Advanced game related topics
User avatar
J. Baker
Addict
Addict
Posts: 2196
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

FPS?

Post by J. Baker »

I wanted to test something with the 3D engine, how do I add in a FPS monitor/display?
User avatar
Comtois
Addict
Addict
Posts: 1432
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Post by Comtois »

Resultat = Engine3DFrameRate(Type)

Type :
#PB_Engine3D_Current
#PB_Engine3D_Average
#PB_Engine3D_Maximum
#PB_Engine3D_Minimum
#PB_Engine3D_Reset
Please correct my english
http://purebasic.developpez.com/
LarsG
Enthusiast
Enthusiast
Posts: 713
Joined: Mon Jun 02, 2003 1:06 pm
Location: Norway
Contact:

Post by LarsG »

Comtois wrote:Resultat = Engine3DFrameRate(Type)

Type :
#PB_Engine3D_Current
#PB_Engine3D_Average
#PB_Engine3D_Maximum
#PB_Engine3D_Minimum
#PB_Engine3D_Reset
HUH!? 8O
Seriously?!?

I didn't know it was this easy in the 3D engine...
Put a smile on my face!! :D

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
User avatar
J. Baker
Addict
Addict
Posts: 2196
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Post by J. Baker »

Ok ,it runs but do I have to do something for it to show text on the screen? Thanks but I should have seen that in the help file. I guess I need some of these 8O ...lol.
LarsG
Enthusiast
Enthusiast
Posts: 713
Joined: Mon Jun 02, 2003 1:06 pm
Location: Norway
Contact:

Post by LarsG »

JB..

Try displaying the text (resultat) after the RenderWorld() is done!!

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
User avatar
J. Baker
Addict
Addict
Posts: 2196
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Post by J. Baker »

This is correct, right?
Resultat = Engine3DFrameRate(#PB_Engine3D_Current)
Did what you said but still not working.
LarsG
Enthusiast
Enthusiast
Posts: 713
Joined: Mon Jun 02, 2003 1:06 pm
Location: Norway
Contact:

Post by LarsG »

I tried this:

Code: Select all

      RenderWorld()
      result = Engine3DFrameRate(#PB_Engine3D_Current)
      If StartDrawing(ScreenOutput())
        Locate(10,10)
        DrawText("The FPS: " + Str(result))
        StopDrawing()
      EndIf
      FlipBuffers()
It works as expected.. :)

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
User avatar
J. Baker
Addict
Addict
Posts: 2196
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Post by J. Baker »

Thank you very much. :D
User avatar
J. Baker
Addict
Addict
Posts: 2196
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Post by J. Baker »

Interesting, my max fps is 61 and this won't go higher. There must be a set room speed of 61. If anyone has got any different, please respond.
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

J. Baker wrote:Interesting, my max fps is 61 and this won't go higher. There must be a set room speed of 61.
Maybe your monitor refreshrate is set to 60hz ?
Try disabling V-Sync in your gfx driver settings.
Good programmers don't comment their code. It was hard to write, should be hard to read.
User avatar
J. Baker
Addict
Addict
Posts: 2196
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Post by J. Baker »

That's not it. I was getting 150+ fps in another OGRE demo and my refresh rate is 75.
User avatar
Comtois
Addict
Addict
Posts: 1432
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Post by Comtois »

J. Baker wrote:Ok ,it runs but do I have to do something for it to show text on the screen? Thanks but I should have seen that in the help file. I guess I need some of these 8O ...lol.

Désormais j'éviterai t'intervenir sur ce forum , ma méconnaissance de l'anglais entraine certaines méprises .
Please correct my english
http://purebasic.developpez.com/
User avatar
J. Baker
Addict
Addict
Posts: 2196
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Post by J. Baker »

Comtois wrote: Désormais j'éviterai t'intervenir sur ce forum , ma méconnaissance de l'anglais entraine certaines méprises .
Umm...ok? :?: :?: :?:
MisterDr
User
User
Posts: 41
Joined: Mon Sep 29, 2003 4:14 pm

Post by MisterDr »

It's funny, for me OGRE is just tool to display some stuff.
Without ODE is useless.
Dr. Dri
Enthusiast
Enthusiast
Posts: 243
Joined: Sat Aug 23, 2003 6:45 pm

Post by Dr. Dri »

J. Baker wrote:
Comtois wrote: Désormais j'éviterai t'intervenir sur ce forum , ma méconnaissance de l'anglais entraine certaines méprises .
Umm...ok? :?: :?: :?:
he just said in french that he'll try not to post because he's got problems with english undersatnding.

Dri
Post Reply