how to texture map nurbs surface
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
Popular Topics
Advertisement
Recommended Tutorials
Advertisement