PDA

View Full Version : nurbs texturing



thisPointer
11-20-2001, 11:57 PM
hi,
is it possible to texture a nurbs object (cylinder) with just one texture? it should be possible, to stretch one texture over the whole surface?! can anybody give a code example or a link?
here the code:
__________________________

gluBeginSurface(theNurb);
gluNurbsSurface(theNurb, 8, uKnots, 12, vKnots, 9*4, 4, &ctrlPoints[0][0][0],
4, // order
3, // order
GL_MAP2_TEXTURE_COORD_2);

gluNurbsSurface(theNurb, 8, uKnots, 12, vKnots, 9*4, 4, &ctrlPoints[0][0][0],
4, // order
3, // order
GL_MAP2_NORMAL);

gluNurbsSurface(theNurb, 8, uKnots, 12, vKnots, 9*4, 4, &ctrlPoints[0][0][0],
4, // order
3, // order
GL_MAP2_VERTEX_4); // GL_MAP2_VERTEX_4 for rational curves (including weights)
gluEndSurface(theNurb);