Hi,
got some problem with NURBS. I got a NURBS specification including weights for every node. I tried to tell opengl the weights as fourth parameter in the controlpoint (so every control point has 4 entries: x, y, z and w). The last parameter from gluNurbsSurface is set to GL_MAP2_VERTEX_4, which tells opengl to use rational b-splines:
gluNurbsSurface(pNurb, // pointer to NURBS renderer
nruKnots, uKnots, // No. of knots and knot array u direction
nrvKnots, vKnots, // No. of knots and knot array v direction
dimV * 4, // Distance between control points in u dir.
4, // Distance between control points in v dir.
ctrlPoints, // Control points
degreeU + 1, degreeV + 1, // u and v order of surface
GL_MAP2_VERTEX_4); // Type of surface
But the result is not as it should be. The surfaces are warped. I tried it with a simple cylinder and it was not round like a circle but the 4 quaters of the cylinder was warped to the outside.
To my question: Is it possible, that the w parameter in opengl is not the weight used in NURBS? Is there any possibility to convert it?
Thanks a lot!