1.打開 codeBlocks,File-New-Project,openGl
在moodle下載freeglut,ru,解壓縮後,複製libfreeglut.a檔,將複製檔檔名改成libglut32.a,在codeBlocks,File-New-Project,Glut project 開啟freeglut
水壺
#include <GL/glut.h>static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glutSolidTeapot(0.3);
glutSwapBuffers();
}
int main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow("我是08161096");
glutDisplayFunc(display);
glutMainLoop();
}
参數
茶壺變色










沒有留言:
張貼留言