Archived

This topic is now archived and is closed to further replies.

themule

how to texture map nurbs surface

Recommended Posts

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.

Share this post


Link to post
Share on other sites