2019年3月7日 星期四

六到布行的部落 2

 2019/0307

1. 點進去小葉的網頁: http://www.cmlab.csie.ntu.edu.tw/~jsyeh/3dcg10/      2. 下載 Example裏的 win32, glut32.dll, data      3. 解壓縮到下載      4. 把已解壓的 data 資料夾拉到windows裏      5. 把已解壓的 glut32.dll 資料夾拉到windows裏      6. 打開 Shapes.exe

1.改點的大小
2.改線的顏色
3.改變線的方向

4.右鍵更多功能




#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("06161110_Week03!!");
    glutDisplayFunc(display);
    glutMainLoop();

}












#include <GL/glut.h>
void display()
{

    glColor3f(0/255.0,84/255.0,45/255.0);
    glutSolidTeapot( 0.3 );
    glutSwapBuffers();
}
int main(int argc, char**argv)
{
    glutInit(&argc,argv);
    glutInitDisplayMode(GLUT_DOUBLE|GLUT_DEPTH);
    glutCreateWindow("06160166_Week03!!");
    glutDisplayFunc(display);
    glutMainLoop();

}

沒有留言:

張貼留言