finding the number of rendered geoms without pstats

Is it possible to pull a value equivalent to what is viewed in the pstats Geoms window?

I figure this would be very useful for dynamically adjusting the draw distance of objects in order to maintain a desired number of geoms. For example I could set the far distance on LODNodes closer if there are too many geoms, or farther if there are not a lot of geoms rendered.

If possible, but not implemented, whereabouts would I add the code to do this? Should I just look at what the pstats collector is doing and expose that in a function somewhere?

There is no such API currently, but it is theoretically possible, as you say, by duplicating the work that is already being done by the PStats collector.

I worry about this a bit, though. Classically, these kinds of auto-adjusting LOD algorithms tend to not be very good. Basing it on the number of Geoms is somewhat better than basing it on the actual measured frame rate; but this still has weaknesses.

But since I don’t have a better suggestion to offer, I’ll stand back quietly. :slight_smile:

David