2019年3月15日 星期五

week04

GLUT程式

今天複習使用旋轉
到 http://www.cmlab.csie.ntu.edu.tw/~jsyeh/3dcg10/
下載        win32  data  socure  glut32.dll

開啟 transfomation  
使用glRotatef(角度,x,y,z)
第一個數字代表的是旋轉角度
後面三個數字代表的是旋轉""的角度



加入 glTranslatef 可以讓茶壺跟著滑鼠移動
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);可以清除背景

glTranslatef 改成glRotatef並加上值就能旋轉茶壺了

沒有留言:

張貼留言