Hello Rene,

Rene Weller wrote:
> Hello,
> 
>> Could you please give a bit more details on what results you get and how 
>> you obtain your triangle count?
> 
> your code works fine and reports the correct number of 7962 triangles. But 
> the stats-Function in the osgSceneViewer reports 7990 triangles for the same 
> object.

ok, thanks, now I can reproduce it. The difference in numbers comes from 
the triangle striper that seems to introduce degenerate triangles 
(although the stitch parameter is false). The Triangle iterator skips 
these degenerate triangles, but since calcPrimitiveCount (which is used 
by the statistics code) only examines the length and type geo properties 
it counts them.
Actually both numbers are correct in a sense, because calcPrimitiveCount 
gives you the number of triangles that are sent to the graphics card 
while the TriangleIterator only gives you "real" triangles.

@Johannes: Can you comment on this behavior of the striper, please? Is 
it expected to generate additional triangles even when stitch is false?

        Thanks,
                Carsten

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to