Hi,

On Wed, 2011-03-23 at 12:11 +0100, Johannes Brunen wrote:
> Hello Gerrit,
> 
> on testing StipGraphOp I came to the conclusion that there might be an error 
> in its implementation. In function travNodeEnter() the geom node is not 
> modified by
> 
> for(UInt32 i = 0; i < t->size(); ++i)
> {
>     if(t->getValue(i) == GL_TRIANGLE_STRIP)
>     {
>         return true;
>      }
> }
> 
> IMHO, correct code should be
> 
> bool flag = true;
> for(UInt32 i = 0; i < t->size(); ++i)
> {
>     if(t->getValue(i) != GL_TRIANGLE_STRIP)
>     {
>         flag = false;
>      }
> }
> if (flag)
>     return true;

hmm, but would that not do the wrong thing ?. The aim of the loop
is to detect if the geometry had already been striped before and if this
is the case not to run the striper the geometry again (unless forces)

So the original loop does that, if it detects a strip inside the types 
it concludes that the striper had already been run earlier and it does
not stripe the geometry again. 

The striper does not guarantee a type field with only GL_TRIANGLE_STRIP
entries. As you say GL_TRIANGLE_FAN is possible but GL_TRIANGLES is as
well. 

What was the problem with the original condition, was checking just for
the first strip to optimistic ?


kind regards
  gerrit








------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to