第一個OPENGL程式
0.將CodeBlocks mingw 17.12安裝好
1.File - New - Project,選OPENGL專案
3.下一步 下一步,完成後,Build&Run
4.可以看到彩色旋轉的三角形!
1.Moodle 下載 freeglut....zip
2.解壓縮至桌面 freeglut目錄
3.將桌面freeglut 中的 lib裡面有 libfreeglut.a複製貼在同一資料夾中,
後將其檔案名稱改成libglut32.a
(是為了能在CodeBlocks中成功開啟檔案!
4.CodeBlock: file - New - Project,選擇GLUT專案
5.取名為week01_GLUT
7.Build & Run ,會看到六個圖形在轉動!
GitHub備份程式
0.登入Github.com
1.New repo 新增專案倉庫
1.1 取名為2022graphics
1.2.Public,Add READNE,
Add .gitignore用C++
1.3按綠色確認,看到你的新的專案倉庫
2.利用Git 指令
2.1.安裝Git for windows
3. 利用 Git指令下載
3.0. 安裝 Git for Windows
3.1. 開啟 Git Bash
3.2. cd desktop 進入桌面
3.2. git clone https://你的倉庫網址
3.3. 查看 桌面,多了 2022graphics 目錄
3.4. 把今天的程式 複製到 剛剛目錄
4. 把修改的資料, 推送到雲端
4.1. cd 2022graphics 進入你的倉庫
4.2. git status 看你的狀況(紅的,多了目錄)
4.3. git add . 把檔案加進帳冊
4.4. git status 再看一次(綠的)
這裡要加入
git config --global user.email "yuxuan910121@gmail.com"
git config --global user.name "yuxuan"
git commit -m "add week01"4.5要 git push上雲端!PS. Chrome記得再登入哦~成功上傳><
沒有留言:
張貼留言