Other
// student name:
// student ID:
// date:
/*#include "D:HomeworkOpenGLFinalCGLabGLUT_Toolkitglut.h"*/
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
GLint ploypoint = 0;
GLint ployline=-1;
GLint height;
GLint choose=0;
GLint move_ployline,move_ploypoint;
struct Point
{
int x;
int y;
};
struct GLintPointArray
{
Point point[60];
};
GLintPointArray ploy[60];
void drawPointLine()
{
for (int i=0;i<=ployline;i++)
{
glBegin(GL_LINE_STRIP);
for(int k=0;k<60;k++)
{
if (ploy[i].point[k].x!=0&&ploy[i].point[k].y!=0)
glVertex2i(ploy[i].point[k].x,ploy[i].point[k].y);
}
glEnd();
}
}
void Mouse(int button, int state, int x, int y)
{
Point temp;
if (state==G
c++
OpenGLMUSTProjectPolylineEditorus
eArrayofC
No comment