Hello, On 05/20/2011 08:09 AM, Till wrote: >>> Are these values cleared at some point during OpenSG rendering pipeline? >> >> yes, IIRC they are cleared at the beginning of the frame. > > I checked that. You're right. Now I understand my problem: The StatCollector > is > reseted/cleared for each viewport and we have several viewports. So I > basically > retrieve the last viewports statistics only. > > Do you have any suggestions on how I could circumvent this?
I'm guessing you are calling Window::render() at some point, which goes over all viewports and renders them in turn. You could implement the functionality of render in your own code and after each viewport add the values from the RenderAction's statistics to a StatCollector of your own: StatCollector accumStats; win->activate(); win->frameInit(); MFViewportPtr::iterator portIt = win->editMFPort()->begin(); MFViewportPtr::iterator portEnd = win->editMFPort()->end(); action->setWindow(win); while(portIt != portEnd) { (*portIt)->render(action); ++portIt; addStats(accumStats, action->getStatistics()); } win->swap(); win->frameExit() where addStats() is a function that gets the values you are interested in from one StatCollector and adds them to another. Alternatively, we could add a bool to the RenderAction that determines if it should reset statistics. Your draw function would have to do the reset at the beginning, but would get statistics over all viewports at the end of the frame. Cheers, Carsten ------------------------------------------------------------------------------ What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users