On Sun, 2010-01-17 at 09:40 +0100, gabor papp wrote:
> hi all,
> 
> i added simple polygon subdivison to the .obj loader, which was needed 
> when the object had various polygon types (e.g. triangles and quads in 
> the same object), or polygons with more than 4 edges.

That's super, thanks!

> i might found a bug with recalc-normals:
> http://www.flickr.com/photos/gaborpapp/4281264822/
> https://savannah.nongnu.org/bugs/?28641

I just 'fixed' this. The behaviour of sharp or smooth normals for
indexed poly prims is implicitly determined by the indexing. 

The problem was that (recalc-normals 0) for indexed polygons works (I
think as expected), (recalc-normals 1) attempted to further blend the
normals, causing corruption. Now there is no difference if you specify
sharp or smooth for the function with indexed mode poly prims.

Food for thought - would it be simpler if we removed support for
non-indexed polygon primitives? We could also restrict the types to
triangle or quad lists. 

The only downside I can see is that there is some fun to be had when
using the turtle builder generating polygons with types like triangle
fan and polygon...

cheers,

dave

Reply via email to