Enable Frame Rate Meter

I cannot seem to enable the framerate meter.

I am using the first tutorial, step 6, and want to enable framerate counting so I can see what kind of performance hits I am running into. I tried enabling the frame rate meter in the config.prc file in every way I could think of:

want-pstats
show-frame-rate-meter

Each key was followed by a value of one of the following:
1
t
true
#t

(I did these one at a time, not all at once as shown above.)

No success.
Am I missing an import in the main .py file?
Any tips on getting this going?

Thanks,
GAmegeEK

I bet you’re not editing the right Config.prc file.

There may be multiple Config.prc files on your disk, and maybe you’re editing a file that Panda is not loading. Look a little closer to find the one that it is loading.

One way to check this out is to do this:

from direct.directbase.DirectStart import *
print cpMgr

It will list the Config.prc files that it loaded this session.

You can also:

from pandac.PandaModules import *
print ConfigVariableBool('show-frame-rate-meter')

to show what the value of this variable is, and what file (if any) set it to that value.

David

Thanks for the quick help. Using the console to output as you suggested I was able to prove it was using the correct .prc file. But, just by running via the console I got the frame rate meter! No edits on my part.

I discovered this:
I had been using the shortcuts, provided with the tutorials, to run the tutorial app. No matter what I changed I could not get the frame rate meter to show.

When I started the same .py file from the console, I got the TK window, and frame rate displays. Tada!

So something about the win shortcut (.lnk) file was preventing it from working. I suspect the “Start in” property. I’ll dig into that later. For now I have it working.

-GameGeeK