2019年4月12日 星期五

喬巴的重起煩躁日 Weekeight

貼圖 Texture (ㄊㄧㄝ ㄊㄨˊ)

➤期中考程式碼:




glPushMatrix(); ///備份矩陣
glTranslatef(x,y,z); ///移動
glRotatef(angle,x,y,z); ///放大縮小

glBegin(GL_POLYGON); //開始畫
   glColor3f(r,g,b); //色彩
   glNormal3f(nx,ny,nz); //打光的法向量
   glTexCoord2f(tx,ty); //貼圖的座標
Coordinate  座標
  glVertex3f(x,y,z); //頂點
glEnd(); //結束畫
glPopMatrix(); //還原矩陣


➤貼圖製作步驟





































沒有留言:

張貼留言