#include <gl/glut.h>
#include <gl/gl.h>
#include <stdio.h>
GLfloat x_coord[100], y_coord[100];
int nPoints = 0;
int j=0;
inline GLfloat x_convert (int x)
{
return -5.0+x/249.0*10;
}
inline GLfloat y_convert (int y)
{
return 5.0 - y/249.0*10;
}
void init(){
glClearColor(1,1,1,0);
}
void myReshape(int w,int h)
{
glViewport(0,0,(GLsizei)w,(GLsizei)h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
//gluPerspective(45.0,(GLfloat)w/(GLfloat)h,1.0,50.0);
if(w<=h)
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余3页未读,立即下载