1.
File-New-Project 貝殼

2.
目錄C:\Users\USER\Desktop\freeglut\include
目錄C:\Users\USER\Desktop\freeglut\lib


3.
Build Uptions 加咒語
freeglut
opengl32
glu32
gdi32
winmm

4.
程式碼
#include <GL/glut.h>
void display()
{
glutWireCube(0.3);
glutSwapBuffers();
}
int main(int argc, char**argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE|GLUT_DEPTH);
glutCreateWindow("Robot");
glutDisplayFunc(display);
glutMainLoop();
}

沒有留言:
張貼留言