Advertisement

how to texture map nurbs surface

Started by April 30, 2003 06:10 AM
-1 comments, last by themule 21 years, 10 months ago
glBindTexture(GL_TEXTURE_2D, texture[0]); gluBeginSurface( nurbSurface ); gluNurbsSurface( nurbSurface, 8, knots, 8, knots, 4*3, 3, &points[0][0][0], 4, 4, GL_MAP2_TEXTURE_COORD_2 ); gluNurbsSurface( nurbSurface, 8, knots, 8, knots, 4*3, 3, &points[0][0][0], 4, 4, GL_MAP2_NORMAL ); gluNurbsSurface( nurbSurface, 8, knots, 8, knots, 4*3, 3, &points[0][0][0], 4, 4, GL_MAP2_VERTEX_3 ); gluEndSurface( nurbSurface ); I use the above code to draw a texture mapped nurbs surface, but it only gives me a plain white nurbs surface. could anyone tell me where am i going wrong? i''ve tried quite a number of things but isn''t working. please help.

This topic is closed to new replies.

Advertisement