Robert,

I already have a custom drawable; in fact that's what I want to view the 
stats of. For example, in  the drawable is some openGL code which 
produces some billboards, and I want to know show how many billboards 
it's drawing. When I toggle the stats on and off, I'd like to see 
something like "Billboards: 2040" along with the framerate info etc.

I've looked at the stats handler and traced the code around. Here's what 
it seems like I need to do... Please correct me if I'm wrong.

1. Add attributes to osg::Stats for the things I care about. (ie: 
"Billboards")
2. Derive from osg::statsHandler to get at those attributes and draw them.

I'm a little confused here about the link between stats and statistics 
but it seems like I also need to...

3. Derive from osg::Statistics (BillBoardStatistics) and add members for 
things I care about ("ie: myNumBillboards").
4. Add an "accept" method to my custom drawable class so that when the 
osg::statsvisitor visits I can get at my derived BillBoardStatistics 
class and update it with info about the number of billboards.

Like I said, I'm confused about the connection between osg::stats and 
osg::statistics. Is there a connection? How does it work?

Am I just way off here?

Thanks,
Brett

Robert Osfield wrote:
> HI Brett,
>
> Just have a look how the present stats are done via the StatsHandler,
> it should tell you the various things that can be done to get things
> renderered and updated - there should be no need for custom drawables
> as it can all be done with standard OSG objects.
>
> Robert.
>
> On Thu, Mar 6, 2008 at 6:24 PM, Brett Wiesner <[EMAIL PROTECTED]> wrote:
>   
>> Hi,
>>
>>  I'd like to display some custom stats every frame. For example, I have a
>>  custom drawable which I'd like to display some information about. What's
>>  the best way to go about doing this?
>>
>>  Thanks,
>>  Brett
>>  _______________________________________________
>>  osg-users mailing list
>>  [email protected]
>>  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>     
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>   

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to