Extreamly high framerate!!!!!!

Started by
15 comments, last by XaOs 22 years, 9 months ago
Hi!! I was making this little program to test the speed diff. between triangle calculations and display lists!! I use 2 cylinders (draw with some math and tris), and a some quads for a floor using fake reflections!!(blending)!!

But when i run this i get between 380 and 430 FPS!!!!!!!!! Can someone download the prog and walk trough the source for me and tell me i you can find something wrong...... I dont think a prog. like this one should run this fast.... At least it never did before...... You can find the source at my page right here Just go to downloads and pick it down..(Wacky FPS Demo)!! Thanx to anyone helping..... - -- ---[XaOs]--- -- - Edited by - XaOs on June 27, 2001 4:08:48 PM
- -- ---[XaOs]--- -- -[ Project fy ||| CyberTux ]
Advertisement
hi, on my system it makes between 740 and 760 fps !!!

Athlon 1.2Ghz
Geforce3

glHorizon_Project



www.web-discovery.net


Sorry to butt in here lads but could you tell me if the way I am calculating FPS makes sense, I do it like so:
Scene_Start = TimerGetTime(); ///Before anything is drawn

<......Stuff drawn........>

Scene_End = TimerGetTime(); ///After everything is drawn
Total_Time = Scene_End - Scene_Start;
FPS = (1 / Total_Time)*1000

My logic is that if Total_Time is the time for one frame then
if I divide by the time taken and multiply by 1000 to get it into seconds instead of milliseconds. Is that OK?, because on my terrain program I made I get around 400FPS on it and it has alota polygons (though it does seem really smooth).
Thanks

And the framerate I got on your program was 110FPS,
my system: Pentium-2-450Mhz, 128MB RAM, Geforce 2 Pro.
AbeE i think the way you calculate fps is correct. btw, how many triangles do you have in your terrain engine ?

glHorizon_Project



www.web-discovery.net


Thanx for the feedback everyone.....
Nice to see that it wasn''t my FPS counter that was screwed!!


Penetrator
How long have you been working on you flightsim...?
It looks bloody awesome....
I specially like your terrain..nurbs / bezier ?

Take Care!

- -- ---[XaOs]--- -- -
- -- ---[XaOs]--- -- -[ Project fy ||| CyberTux ]
hi XaoS, i started working on glHorizon flightsim last November: terrain engine is generated from a satellite heightmap area of about 4.000.000 km² (2000km*2000km), which include the bordering region between Ethiopia, Sudan, Kenya and Uganda.
Basically the terrain engine is formed from subsequent triangle strips, whose vertex are computed from the heightmap of course. I''m planning to use ROAM alghorithms in the future. But the most difficult part was the flight model: now also that is quite advanced and working well, the simulation is playable, perhaps i''ll release a little demo in the next weeks.

Check out www.web-discovery.net !

bye


glHorizon_Project



www.web-discovery.net


I think the reason it is so high is that you aren''t flushing the triangles - so you are only calculating on CPU time (always low). You should read the value several frames in a row and take the average.

Since I''ve just made a release I''m in plug mode PoratLib has some FPS calclation code I''ve found to be very reliable. (link in signature).

Let me know how it goes!

~~~
Cheers!
Brett Porter
PortaLib3D : A portable 3D game/demo libary for OpenGL
~~~Cheers!Brett PorterPortaLib3D : A portable 3D game/demo libary for OpenGLCommunity Service Announcement: Read How to ask questions the smart way before posting!
penetrator:
mmmmmmm,....Well, I have a loop that goes through 7200 triangles but after the terrain is generated its stored in a display list, I''ve managed to get the FPS up as high as 500fps with this many triangles. Its a really basic little program though. Nothing like you guys would make but its my first real ''project'' so to speak and so I''m quite pleased with it. The only real problem I have with it is that it takes about 30 seconds to load the vertices into an array which is quite annoying.
Heres a neat trick for calculating an average framerate, without have to store the previous 30 frames in an array.

let FPStmp = 1000/Time_End-Time_Start
multiply FPS by N
add FPStmp
divide by N+1

so I suppose its FPS = [(FPS*N)+(1000/Time_End-Time_Start)]/(N+1)

The higher N the less erratic the Frame count, but it also takes longer before it reads correctly
The best way to measure FPS is to have a variable set to the millisecond count (using either timegettime, (the best) a performacnce counter divided by its frequency, or (the worst) GetTickCount)...
Each frame, test the variable to see if it is smaller than the current time-1000, when this is true, 1 second will have passed. you can simple count the frames between each second, and set the checking variable to the new time. it isn''t perfectly accurate at low fps, but it is _VERY_ accurate at high fps.
Finding the FPS at very high frame rates is very inacurate if you try and do it every frame.

On the fps issue, its all in how complex your loop''s are. You can get 15m/tris/sec with a loop just using GL primitive calls, but that will dive to around 0.5-1m/tris/sec if you add a _SINGLE_ if, or such...

its also about keeping the processor and vid''card busy at the same time, but that gets complex

This topic is closed to new replies.

Advertisement