2017年9月14日 星期四

Claire 的課堂作業 week1




Computer Graphics 第一週教學內容

安裝CodeBlocks


1. 無論檔案哪裡來,一定要有認明codeblocks-xx.xxmingw哦


2. 下載完成後,點開執行檔開始安裝


3. Click "I Agree"


4. Click "Next >". Do not change any settings.


5. Choose a best space for CodeBlocks then click "Install".



啟動OpenGL Project


安裝好CodeBlocks後,我們要試著啟動OpenGL專案

1.  we can new a project at File --> New--> Project..
-












2. choose "OpenGL project"


3. Give your project a title and space to save.


































4. Now we can have a initial project. When we click "build an run" , it will look like this.



PS.  If there is any error after install, try "Settings --> Compiler --> Toolchain executables" and click "Auto-detect" on Compiler's installation directory to fix the problem.



修改 GLUT Extention


接著處理我們所下載的freeglut-MinGW-3.0.0-1.mp.zip檔,
要做一些小修改,讓CodeBlocks可以識別它,並執行。

1. 解壓縮後可以得到一個freeglut的資料夾

2. 在freeglut/lib之下,複製libfreeglut.a,並且將檔名改成 libglut32.a



Create GLUT Project


1. Choose File --> New --> Project.. and choose "GLUT Project"



2. Click "Next"


3. Give your project a name and saving space


4. 接下來會要求GLUT外掛檔案的位置,這時候拿出我們原本下載的壓縮檔,是一個名為"freeglut"的檔案,將他的位置複製貼上到畫面上。


5. Click "Finish"


6. 接著執行,就可以看到畫面如下



沒有留言:

張貼留言