2024年4月18日 星期四

week09(11行程式碼)

week09-1_sample

安裝freeglut

開新專案week09-0_sample






複習上週week08-4_glm_gundam_opencv_texture_lighting 

把環境設好: OpenCv

這個要改
目錄不要
重開codeblocks


Setting-Compiler 要加入 OpenCV 相關的3個設定
-compiler 的 incldue 要加入 C:\OpenCV2.1\include
-linker 的lib 要加入 C:\OpenCV2.1\lib
-linker 設定 要加入 cv210 cxcore210  highgui210

把上週github倉庫複製下來
git clone https://github.com/帳號/2024graphicsa




摳下資料夾用git做

把上週week08-4_glm_gundam_opencv_texture_lighting開啟


正常開啟

0.把剛剛的專案先關起來
1.把week08-4_glm_gundam_opencv_texture_lighting複製到桌面的week09-1_glm_gundam_opencv_texture_lighting
2.把新目錄裡的專案檔week08-4_glm_gundam_opencv_texture_lighting.cbp  改檔名變成
week09-1_glm_gundam_opencv_texture_lighting.cbp
3.codeblocks 開week09-1
4.把專案的title改week09-1  用notepad++ 開啟把裡面的week08-4 改成week09-1
5.再用codeblocks打開



11行程式碼

#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_DOUBLE|GLUT_DEPTH);
    glutCreateWindow("week08 gundom");
    glutDisplayFunc(display);
    glutMainLoop();
}





沒有留言:

張貼留言