i=0;
glClearColor(1.0,1.0,1.0,0.0);
glClear(GL_COLOR_BUFFER_BIT);
glColor3d(0.0,0.0,0.0);
glBegin(GL_POLYGON);
}
for(;i<num;i++)
{
glVertex2iv(point[i]);
}
glEnd();
glFlush();
}
}
GLvoid CALLBACK left(AUX_EVENTREC *event)
{
if(num>=MAXPOINTS) return;
point[num][0]=event->data[AUX_MOUSEX];
point[num][1]=event->data[AUX_MOUSEY];
num++;
flag=1;
}
GLvoid CALLBACK right(AUX_EVENTREC *event)
{
draw();
}
GLvoid CALLBACK resize(GLsizei w,GLsizei h)
{
glLoadIdentity();
glViewport(0,0,w,h);
glOrtho(0.0,(GLdouble)w,(GLdouble)h,0.0,0.0,1.0);
glClearColor(1.0,1.0,1.0,0.0);