From: Brian P. <br...@va...> - 2001-01-16 15:30:48
|
Stephen Tse wrote: > > Brian Paul <br...@va...> writes: > > > > > How do they compare when you enable smooth shading for the sphere? > > > > Oddly, they look the same when smooth shaded. Why?? Then, it's not the > problem of the normal? It's not odd at all. The color at each vertex is being computed correctly, and identically by both OpenGL implementations. It's just that when you're flat-shading that a different vertex is being chosen to color each quadrilateral. This is probably due to the quad strips being drawn in a different order in the two gluSphere() implementations. > > It may be that because of the vertex order for the triangle strips > > being different, that a different provoking vertex is being used > > for filling each facet. > > Can that be fixed? You could modify gluSphere() to compute/draw the vertices in reverse order (or some other order). I haven't compared Mesa's gluSphere() to the SI's version so I can't say exactly. > > The GLU spec doesn't say exactly how the triangle (or quad) strips > > are to be oriented in gluSphere so this might be an allowable > > variation. > > Variation? But this is a huge visible discrepancy, though. I draw the > box in the light source position. It seems that the specular > reflection is more "accurate" in sgi glu. I can't say for sure though. It's an unfortunate variation. But as I said, I don't think the GLU spec goes into that much detail. > > Thanks. My plan is to replace Mesa's GLU with the SI GLU someday > > (when I find time). > > You mean SGI open-source reference implementation? Their code style is > horrible because of over-optimization. Honestly, I like Mesa code much > better. It is more readable. But Mesa's GLU tessellator and NURBS code isn't nearly as good as the SI code. -Brian |