2015年5月7日 星期四

02160501_陳立中_WEEK11

今日目標
(1)Timer計時器
(2)多個貼圖
(3)作業:互動小遊戲
(4)總結

用timer讓物體可以穩定等速的旋轉
void timer(int t)
{
      glutTimerFunc(10,timer,0);
      angle+=1;
      glutPostRedisplay();
}
用上禮拜教的console application寫程式

 option的linker setting新增
"freeglut" "opengl32" "glu32" "gdi32" "winmm" "cv210" "cxcore210" highgui210"

 search direction compiler 新增兩路徑:
C:\opencv2.1\include
C:\users\USER\Desktop\freeglut\include

 linker新增
C:\opencv2.1\lib
C:\users\USER\Desktop\freeglut\lib


 之後就可以做出來旋轉的地圖

再來要嘗試 做出兩個貼圖在同一個程式 可以更換


程式碼很多很煩  有很多重複的 可以整合成一個函式裡面
看起來就簡單多了








沒有留言:

張貼留言