PDA

View Full Version : set color for Nurbs object



stella
05-09-2005, 06:57 AM
Hi,

Anybody know how to set colors for Nurbs objects? The following is the code I wrote, but does not work. Thanks.

gluBeginSurface(theNurb);
gluNurbsSurface(theNurb,
numKnots, knots,
numKnots, knots,
4,
4*Width,
&ctlpointsCorlor[0][0][0],
4, 4,
GL_MAP2_COLOR_4);
gluNurbsSurface(theNurb,
numKnots, knots,
numKnots, knots,
3,
3*Width,
&ctlpoints[0][0][0],
4, 4,
GL_MAP2_VERTEX_3);
gluEndSurface(theNurb);