WEEK03
WORK01
第一步:輸入jsyeh.org/3dcg10/,找尋data、win32、glut32.dll點擊下載
第二步:將windows檔案解壓縮,並拉至桌面
第三步:將data檔案解壓縮,把data檔案拉至windows資料夾中
第四步:將glut32.dll拉至windows資料夾中
第五步:將shape.exe打開(如果沒有完成上述3~4步驟,將無法開啟
WORK02
WORK03
#include <GL/glut.h>
void display()
{
glBegin(GL_POLYGON);
glColor3f(1,0,1);glVertex2f(1,1);
glColor3f(1,1,0);glVertex2f(1,-1);
glColor3f(0,1,1);glVertex2f(0,0);
glEnd();
glutSwapBuffers();
}
int main(int argc, char**argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow("Hello");
glutDisplayFunc(display);
glutMainLoop();
}



















沒有留言:
張貼留言