Draw path

Hello
I’m try draw path composed of lines and curves Bezier and then I’m want fill it. But below code not work correctly :frowning: because call glMap1f function within glBegin…glEnd not work.
How I can draw such polygon?

glBegin(GL_POLYGON)
  glVertex2f(0, 0)
  glVertex2f(100, 0)
  glVertex2f(100, 100)

//then I'm want draw curve like this:
GLfloat ctrlpoints[4][3] = {
  {100, 100, 0}, { 70, 150, 0.0}, { 30, 130, 0},
  { 0, 0, 0 }};

  glMap1f(GL_MAP1_VERTEX_3, 0.0, 1.0, 3, 4, &ctrlpoints[0][0]);
  glEnable(GL_MAP1_VERTEX_3);

 for (int i = 0; i <= 30; i++) {
   glEvalCoord1f((GLfloat)i / 30);
  }

glEnd();