

1.jsyeh.org/3dcg10網站 載data win32 glut32.dll
2.解壓縮後Data拉成一層
3.window解壓縮把裡面東西拉到外面

#include <GL/glut.h>
void display()
{
glBegin(GL_POLYGON);
glColor3f(1,1,0); //顏色
glVertex2f(0.5,0.5); //點的位置
glVertex2f(0.5,-0.5);
glVertex2f(0,0);
glEnd();
glutSwapBuffers();
}
int main(int argc, char**argv)
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow("hello");
glutDisplayFunc(display);
glutMainLoop();
}
沒有留言:
張貼留言