Week10-1
從老師的網址https://jsyeh.org/3dcg10/,點window和data檔案接著解壓縮
解壓縮之後將data放進去windows,按下Transformation
老師講解每個模型包含的寫法,以dolphins模型為例
Week10-2
開啟新專案<week10_glm>將之前10行程式碼複製上去
#include <GL/glut.h>
void display()
{
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("week10");
glutDisplayFunc(display);
glutMainLoop();
}
到window--data將所有模型複製貼上到桌面--freeglut--bin
按add files匯進檔案
Week10-3
開啟新專案<week10_glm_gundam>,複製剛剛<week10_glm>的程式碼
再將(glm.cpp)和(glm.h)的檔案放進去
到以下圖片呈現的地方設定
Search directions-Compiler-(C:\OpenCV2\include)
Search directions-Linker-(C:\OpenCV2.1\lib)
Linker settings-Link libraries-(cv210)
(cxcore210)
(highgul210)
沒有留言:
張貼留言