gluNurbsSurface stopping short

i’m basicly just trying to proof a nurbs importer i’ve hacked together. i’m reading in a file, and rendering the nurbs model with glNurbsSurface et al.

basicly glNurbsSurface appears to not be sampling the last two spans.

their is nothing wrong with the importer… everything checks out. the control points are all their and in proper order, even though the file format seems to transpose them (i remapped that).

the arguments are all up to spec. GLU_CULLING is not the issue. the surface the surface is degree 2x2 (passed as order)… there are 15x8 knots, 14x7 control points. the control points all render properly and in order (colour indexed).

the dispatch looks like:

gluNurbsSurface(handle,u,knots.u,v,knots.v,
                4,(u-(degree.u-1))*4,
                (float*)controls,3,3,
                GL_MAP2_VERTEX4);

sorry about the crazy argument layout… i don’t want it to force the thread resolution beyond 800.

everything looks good… just the last two spans in u and v are missing.

while i’m here, i’m also wondering if there is any support in glNurbsSurface for periodic input?

tucked away in fine print in the remarks of my docs their was a bit that said the number knots should be the number of controls minus the order.

i just extended the knot vector and padded the knots with the first and last knots… i guess this is what is expected.

the surface came out periodic with the first knot set to -1 like in the file format… i haven’t looked to see though if control points overlap on the period border or not.

sincerely,

michael