1.開一個新的專案,命名為"week16-0_sample"
2.準備上課環境
3.接下來,看一下課本的程式
4.jsyeh.org/3dcg10 下載data.zip windows.zip
5.windows.zip=>下載\windows\Projection.exe
5.data.zip=>下載\windows\data\一堆模型
6.開一個新的專案,命名為"week16-1_sample_glutLookAt"
7.要改resize()函式在裡面,加上glutLookAt()函式,就可以看著左上角的那個圓球!!
8.現在要做另一個修改,想要在按按鍵時,看不同地方,先把剛剛加的第39行註解
9.開一個新的專案,命名為"week16-2_glutReshapeFunc_glutPerspective_gluLookAt"
10.請先看課本Projection.exe的範例
11.glutPerspective透視投影
glOrtho垂直投影
glFrustum比較奇怪,我們通常不用它的投影法
左右下上近遠 共6組參數
gluPerspective(視角,長寬比,z近,z遠)
fovy field of view in y視角
aspect ratio長寬比
12.我們將要寫個程式,11行+8行,做出透視投影
13.開一個新的專案,命名為"week16-3_myTexture_id1_id2_glBindTexture"
14.若想要有兩張貼圖(一張背景,一張給模型)
15.偷用week05_rotating_earth/main.cpp裡的程式碼
16.但執行會出錯:OpenCV Error:Null pointer(NULL array pointer)
沒有留言:
張貼留言