I am using glEvalMesh1() to calculate the coordinates of a Bézier curve and draw the curve. To be honest I had a hard time finding out how this function works because I am a complete newbie in 3D graphics. Now I managed to draw the curve this way:
glLineWidth(PATH_LINE_WIDTH);
glMap1d(GL_MAP1_VERTEX_3, 0.0, 1.0, 3, PATH_CONTROL_POINTS, (double *) &(path->control_points[0]));
glEnable(GL_MAP1_VERTEX_3);
glMapGrid1d(50, 0, 1);
glEvalMesh1(GL_LINE, 0, 50);
I need to get the calculated coordinates for certain segments of the curve or the whole curve because I need to perform physics-related calculations.