2019年3月7日 星期四

HW3_06160832 電腦圖學

點、線、面、顏色實作
1.到
http://www.cmlab.csie.ntu.edu.tw/~jsyeh/3dcg10/



下載: windows.zip
          data.zip
          glut32.dll
把GLUT裡的main.cpp裡的程式刪光光打上
#include<GL/glut.h>
void display(){
    glutSolidTeapot( 0.3 );
    glutSwapBuffers();
}
int main(int argc,char**argv)
{
    glutInit(&argc,argv);
    glutInitDisplayMode(GLUT_DOUBLE|GLUT_DEPTH);
    glutCreateWindow("WeekQ3");
    glutDisplayFunc(display);
    glutMainLoop();

}





在加glColor3f(0,0,1);
裡面的三個數值分別代表RGB
輸入1~0就可以改顏色了

沒有留言:

張貼留言