(1) 建立GLUT project
(2) 把 CodeBlock的 .cbp檔 裡的working-dir 改成 "."
(3) 把C:\Users\user\Desktop\freeglut\bin\freeglut.dll copy and paste in your project file
計時器
(1) int main(int argc, char *argv[]){
....
glutCreateWindow("GLUT Shapes");
glutTimerFunc(2000, timer, 0); // 要在 glutCreateWindow() 之後,
....
}
(2) void timer(int t){
glutTimerFunc(1000, timer, 0);
PlaySound("Do.wav", NULL, SND_ASYNC);
}

內插公式 : 新 * a+舊 * (1-a)
(0--1)

沒有留言:
張貼留言