2016年2月22日 星期一

01160440_陳奕安 week01

1. WebLG






2.code blocks


開啟code blocks選擇New => Project



下拉選擇OpenGLproject



打上專案名稱與建檔地



點選build and run



展示成果



3.GLUT程式

new => project => GLUTproject




填入freeglut資料夾位置



展示成果



#include <GL/glut.h>
void display()
{
    glutSolidTeapot(0.3);
    glutSwapBuffers();
}
int main(int argc, char**argv)
{
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_DOUBLE | GLUT_DEPTH);
    glutCreateWindow("hello 3D");
    glutDisplayFunc(display);
    glutMainLoop();
}

沒有留言:

張貼留言