PDA

View Full Version : glEvalCoord



06-09-2002, 08:18 PM
Hello,
I'm trying to determine how I can get the
vertices produced by 'glEvalCoord1f'...
Of course, I already have the control points.
It's the points that are on the curve
generated which I need.
All help is aappreciated. Thanks!
Jon

I'm using the example from Chap12 (redbook)
as follows:

glMap1f(GL_MAP1_VERTEX_3, 0.0, 1.0, 3, 7, &ctrlpoints[0][0]);
glEnable(GL_MAP1_VERTEX_3);
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(0.5, 0.5, 0.5);
glBegin(GL_LINE_STRIP);
for (i = 0; i <= 30; i++)
{
glEvalCoord1f((GLfloat) i/360.0);
}
glEnd();

Deiussum
06-10-2002, 04:46 AM
I'm not sure if there is any way to get them directly, except possibly through use of the feedback buffer. I haven't really done much with the feedback buffer, however.

Another option would be to examine the formulas that OpenGL uses to calculate the points. I believe they are described in the OpenGL specification. You could then use those formulas directly to calculate the results.