#week09
##week09-0_sample
#程式碼重新再利用
1.將GitHub上週的程式 clone 下來 (先有程式碼)
- 在小黑 Git Bash 裡指令:
- cd desktop (進入桌面)
- git clone https:/github.com/你的帳號/2024graphicsb
- cd 2024graphicsb (再進入你的倉庫的目錄)
- start .(開啟檔案總管)
2.確認環境沒問題(OpenCV有沒有裝好)
- 安裝 OpenCV 要勾Add PATH, 裝在預設目錄
- Setting-Compiler裡,要把 OpenCV 的三個設定設好
- 第三個 Search directories 裡,
-Compiler 加 C:\OpenCV2.1\include
-Linker 加 C:\OpenCV2.1\lib
- 上方第二個分頁 Linker Setting
- cv210 cxcore210 highgui210
- 重新開啟 CodeBlocks
3.專案的設定是否需要修改(Setting-Compiler...)
##開啟上週專案 07-2_obj_gundam_opencv_texture
1.File-Open, 點選剛剛 Git 下載的
- C:\Users\Administrator\Desktop\2024graphicsb\week07-2_obj_gundam_opencv_texture
2. 選week07-2_obj_gundam_opencv_texture.cbp(CodeBlocksProject檔)
3.Build&Run 看他執行成功了恭喜你
##week09-1_obj_gundam_opencv_texture_lighting
0.當前一個目錄 week07-2_obj_gundam_opencv_texture 整個 copy到新的目錄
week09-1_obj_gundam_opencv_texture_lighting
1. 再用 Notepad++ 開啟 目錄裡的.cbp檔,改內容
2.把打光的八行陣列,
##week09-2_glutSolidCube_glutSolidTeapot_glutSolidSphere
1. File-New-Project, GLUT專案
week09-2glutSolidCube_glutSolidTeapot_glutSolidSphere
2.貼入 11 行 GLUT 程式
3. 加入 glutSolidTeapot( 0.3 ) 和 glutSolidCube( 0.3 ) 和 glutSolidSphere(0.2, 30, 30);
4.配合 glPushMatrix
##上傳 GitHub 注意事項
1.小黑關掉
2.Codeblocks關掉(都要按 Yes存檔)
3.把每個專案的兩個目錄(bin,obj)刪掉
4.把.depend .layout 刪掉
5.把今天的4個程式的專案目錄,上傳到GitHub
沒有留言:
張貼留言