I have a PC that runs new source engine games in realtime framerate at high graphical settings.
Though my simple panda game can’t reach 60 fps. In hope that its my fault for doing something stupid, I finally learned to use PStats and trying to find out what is causing the low framerate.
I read the manual page for pstats, but it doesnt explain everything.
So this is why I started this topic.
The manual mentions the main collectors are App, Cull and Draw, but theres also Frame, * and Wait. I dont really understand what they are for based on the subcollector names, but Wait and * seem to be the ones going way up from 60hz:
I’m guessing you have video sync enabled (it is enabled by default). With video sync enabled, the frame will wait for the next integer fraction of 60 Hz before drawing, so if your frame rate drops a tiny bit below 60 Hz, it means you will actually achieve 30 Hz. That extra time shows up in “Wait”. (If you double-click on “Wait”, you’ll see more information, and you’ll see that it’s waiting in Wait:Flip, which is where the graphics driver holds up the frame for video sync.)
To disable video sync, put:
in your Config.prc file. Note that the graphics driver might still override this setting; if that happens to you, you have to disable video sync in your graphics driver settings.
For the record, “Frame” is the total frame time, and “*” is the general overhead category which includes animation time. “Wait” is any time Panda isn’t doing anything, and it includes video sync wait as well as other kinds of waits.
Why would video sync be disabled when you go below 60? The main reason for enabling video sync is to prevent tearing, which happens when you render a frame at the same time the video refreshes. That can happen regardless of your frame rate.
Also, since your reported frame rate is an average over time, it can report values that range between 30 and 60. Even though any one frame is either 30 or 60, an average of many of them could be any number in between. But your PStats graph looks like it’s mostly either 60 or 30, which strongly suggests video sync to me. Also the symptoms you describe strongly suggest video sync.
The proof is to double-click “Wait” and see where all the wait time is spent. If it’s in “Flip”, that’s almost certainly video sync.
Nope. Just textured with transparent png.
I have mentioned of the poor performance I get with transparent textures before: panda3d.org/forums/viewtopic … highlight=
of course in actual games where other things are happening the performance loss is more obvious. Also antialiasing has additional effect on this.