can you tell me how to use gluNurbsSurface()

I use gluNurbsSurface() to draw a NURBS surface. Because the control points of NURBS surface are obtained by reading the data files,
the dimension of control points array is variable.
But gluNurbsSurface() requires the dimension is stable in vc++6.0. Could you help me?

I don’t quite understand your problem. The arrays you are passing to gluNurbsSurface() are all declared as pointers, not arrays of any specific length, so you should be able to pass anything that is a (pointer to a) fixed length array of the correct type, or a (pointer to a) dynamically allocated array of any length, either from C or C++.

If you don’t want to allocate the arrays dynamically, you can always use a fixed length array that is big enough to hold the largest input array you have. The function gluNurbsSurface() has explicit extra arguments that tell it how many elements of the array are actually used, so a large fixed-size array should not really be a problem either.

I might have misunderstood your question, so please ask again if you think this didn’t help.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.