How do I draw multiple bezier curves??

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);
   glShadeModel(GL_FLAT);
    
   for(j=0; j<2; j++){
	    glColor4f(0.0, 0.0, 0.0, 0.5);
	   //glShadeModel(GL_FLAT);
   glMap1f(GL_MAP1_VERTEX_3, 0.0, 1.0, 3, 4,       &ctrlpoints[j][0][0]);
   glEnable(GL_MAP1_VERTEX_3);
   }

only one curve is visualized. why???

Thanks a lot for your idea.

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.