Week07-1貼圖
- 先登入https://jsyeh.org/,將windows解壓縮並將data丟進去
- 改變glVertex3f的數值讓圖片的角浮起
- 可以改變貼圖座標(glTexCoord2f)座標在0到1之間
- 右鍵點Matrix可調整選取範圍
- 成功調整選取範圍
Week07-2OpenCV
- 打開桌面的上課軟體,並打開OpenCV-2.1.0-win32-vs2008.exe
- 將CodeBlock重開,並到Settings的Compiler調整設定
- Compiler add C:\OpenCV2.1\include
- Linker settings加上cv210、cxcore210、highgui210
- File>New>Empty file
- 輸入以下程式碼
- 到https://gist.github.com/jsyeh/找到myTexture.cpp
- 將35行程式碼複製
- 將想要的圖片拉到桌面,並貼上程式碼,就可展出想要的圖片
Week07-3地球茶壺
- 開一個新專案後,去網路上找地球的圖片
- 將地球照freeglut>bin的路徑存起來
- 複製程式碼,貼上後再加幾行程式碼(做出背景)
- 成功做出有背景的地球茶壺
- 一樣到https://gist.github.com/jsyeh/複製myEarth.cpp的程式碼
- 執行讓地球轉起來
沒有留言:
張貼留言