(1)OpenGL專案
(2)GLUT專案
二.課堂
(1)GULT 10行做出茶壺
1.打開GLUT專案--縮減程式碼(前)
2.縮減程式碼(後)
#include <GL/glut.h>
static void display(void)
{
glutSolidTeapot(0.3);
glutSwapBuffers();
}
int main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow("04160585");
glutDisplayFunc(display);
glutMainLoop();
}
3.build and run program
(2)幫茶壺上色
1.
新增 glColor3f(1,1,0);
2.
(1)
網址:jsyeh/3dcg10/
進入後download win32/linux/data/glut30.dll
(2)
windows--->shape--->右鍵--->Triangle
(3)自己製作三角形









沒有留言:
張貼留言