#include <iostream>
#include<GL/glut.h>
#include <windows.h>
using namespace std;
int n;
struct vertex {
float ver_x;
float ver_y;
};
typedef struct XET {
float x;
float dx, ymax;
XET* next;
}AET, NET;
struct point {
float x;
float y;
};
vertex* ver;
void input() {
cout << "输入要显示的多边形共有几个顶点" << endl;
cin >> n;
ver = (vertex*)malloc(sizeof(vertex) * n);
for (int i = 0; i < n; i++) {
cout << "按顺序输入每个顶点的想x,y值,每输入完一个顶点,点击回车进入下一个顶点的输入" << endl;
cin >> ver[i].ver_x >> ver[i].ver_y;
}
}
void Polygon() {
int MaxY = 0;
int i;
for (i = 0; i < n; i++) {
if (ver[i].ver_y > MaxY)
MaxY = ver[i].ver_y;
}
AET* pAET = new AET;
pAET->next = NULL;
NET* pNET[1024];
for (i = 0; i <= MaxY; i++) {
pNET[i] = new NET;
pNET[i]->next = NULL;
}
glClear(GL_COLOR_