代码如下,运行时运行不能通过,请帮忙查找下原因,谢谢。
#include <gl/glut.h>
#include <iostream>float control[4][3]={{-4.0,-4.0,0.0},{ -2.0,4.0,0.0},
{ 2.0,-4.0,0.0},{ 4.0,4.0,0.0}
};void Initialize()
{
glClearColor(0.0f,0.0f,0.0f,0.0f);
glShadeModel(GL_FLAT);
}void Render()
{
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
glLoadIdentity(); glTranslatef(-3.0f,0.0f,0.0f);
    
glEnable(GL_MAP1_VERTEX_3);
glMap1f(GL_MAP1_VERTEX_3,0.0,1.0,3,4,&control[0][0]);
glColor3f(1.0f,1.0f,1.0f);    glBegin(GL_LINE_STRIP);
   for(int i=0;i<=30;i++)
   glEvalCoord1f((float)i/30.0f);
glEnd(); /* glMapGrid1f(100,0.0f,100.0f);
glEvalMesh1(GL_LINE,0,100);*/
glPointSize(3.0); glBegin(GL_POINTS);
   for( i=0;i<4;i++)
   glVertex3fv(&control[i][0]);
glEnd(); glFlush();
}void myMainWinReshape(int _width, int _height) {
GLfloat fspect;
if(_height==0)
{
_height=1;
}
fspect=(GLfloat)_width/(GLfloat)_height;
// Set the perspective coordinate system
glMatrixMode(GL_PROJECTION);
glLoadIdentity();

// field of view of 45 degrees, near and far planes 1.0 and 425
//gluPerspective(70.0f, fspect, 1, 412);
gluPerspective(45.0f, fspect, 1,412);
// Modelview matrix reset
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}int main()
{
glutInitDisplayMode(GLUT_RGB|GLUT_SINGLE);
glutInitWindowPosition(0,0);
glutInitWindowSize(600,600);
glutCreateWindow("二次曲线");
Initialize();
glutDisplayFunc(Render);
glutReshapeFunc(myMainWinReshape); 
glutMainLoop();
return 0;
}