views:

330

answers:

1

I am trying to draw high order Bezier Curve using OpenGL evaluators:

glMap1f(GL_MAP1_VERTEX_3, 0.0, 1.0, 3, 30, &points[0][0]);

glMapGrid1f(30, 0, 1);
glEvalMesh1(GL_LINE, 0, 30);

or

glBegin(GL_LINE_STRIP);
for (int i = 0; i <= 30; i++) 
  glEvalCoord1f((GLfloat) i/30.0);
glEnd();

When number of points exceeds 8, curve disappears. How to draw higher order Bezier curve using evaluators?

A: 

By any chance are you get a GL_MAX_EVAL_ORDER error? Bezier curves become unstable at high degrees. I wouldn't be surprised if your OpenGL implementation just gave up.

You can use glGet with GL_MAX_EVAL_ORDER to see what your implementation maxes at. If you need something higher, you can always roll your own, which isn't too bad.

voodoogiant