View Full Version : How do I draw multiple bezier curves??

10-08-2007, 06:42 AM
Hi there,

I have a problem to visualize multiple bezier curves.

the controlpoints[n][4][3] is provided.

I want to draw N Bezier curves.

Why can not I visualize them all at the same time??

void init(void)
int j;
glClearColor(1.0, 1.0, 1.0, 0.0);

for(j=0; j<2; j++){
glColor4f(0.0, 0.0, 0.0, 0.5);
glMap1f(GL_MAP1_VERTEX_3, 0.0, 1.0, 3, 4, &amp;ctrlpoints[j][0][0]);
}only one curve is visualized. why????????????

Thanks a lot for your idea.

10-08-2007, 07:07 AM
I don't know much about using OpenGL for bezier curves, but I think you need to put the glEnable(GL_MAP1_VERTEX_3) before the command to draw the curve. The way your code is set up, it is only enabled for the 2nd curve, not the first.