Hi Allen,

Allen Bierbaum wrote:
> I need to collect some statistics for a recent project so I have been 
> tracing through the Statistics code in OpenSG 2.0.  I have to confess 
> that I am pretty confused about how to get things work.  I think I can 
> hack it but I don't really understand what is going on.  OpenSG is so 
> flexible that I can't see the forest through the trees so to speak.  
> Anyway, here are a few questions I can up with when going through this code.
> 
> - How do you know which stat elements you can add?  (it looks like some 
> are specific to certain actions and node types)

You can add any of them, but they might not get used, depending on your 
scenegraph and action.

> - How do the stats get hooked up with the actions?  Adding an element 
> (SimpleStatisticsForeground::addElement) just seems to push stat ids on 
> a list. How does this tell the traversal to actually collect that 
> statistics?

The Action has a collector that needs to collect them. The forground just 
displays (a subset) of them.

> - Where can I find a list of available stats, when they can be used, and 
> how to enable/disable them?

Sorry, just in the code.

> - Why do the stats have StatElemDesc's specific to certain draw 
> actions?  Couldn't we use the same state name in multiple traversals so 
> the code doesn't break when you switch actions? (for example why are 
> their two statDrawTime's in the code)

Legacy. The RTA has newer, namespaced names. The RenderAction will go away.

> - Would it be possible to load some stat "harnesses" dynamically?  For 
> example could we add a dynamic stat util library that would allow access 
> to the Nvidia perf sdk?  (we already have some code for this in 
> testOcclusionCulling.cpp, but it uses ifdefs to enable/disable the code)

Not sure how to do that, as you need to actually insert code in a number of 
different places to make that work.

        Dirk

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to