2021年3月3日 星期三

week02傳廣盃八强副K

 1.打開 codeBlocks,File-New-Project,openGl

                                            


在moodle下載freeglut,ru,解壓縮後,複製libfreeglut.a檔,將複製檔檔名改成libglut32.a,在codeBlocks,File-New-Project,Glut project 開啟freeglut





#include <GL/glut.h>

static void display(void)

{
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    glutSolidTeapot(0.3);
    glutSwapBuffers();
}

int main(int argc, char *argv[])
{
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
    glutCreateWindow("我是08161096");
    glutDisplayFunc(display);
    glutMainLoop();
}

参數



茶壺變色



加入三角形






沒有留言:

張貼留言

距地表面160 Week11

 #include "glm.h" GLMmodel* pmodel = NULL; void drawmodel(void) {     if (!pmodel) { pmodel = glmReadOBJ("data/porsche.obj...