Windows10, visual studio 2015
- GLFW 允許使用者創建OpenGL上下文,定義窗口參數以及處理輸入
- GML OpenGL Mathematics,幫助數學運算的函示庫
- GLEW OpenGL Extension Wrangler provides,能自動識別使用者的平台所支持的全部OpenGL高級況展函數。
所以我們把以上include進自己的專案中
- include檔案夾包含各種.h檔
- lib檔案夾包含各種lib檔案,讓動態連結程式庫(dll)去取用
light.frag & light.vert 用來setup shader
進入build 開啟ConsoleApplication.sln按執行或 進入Release開啟ConsoleApplication.exe
- 一開始GLFW 初始化
- set the hint before glfwCreateWindow
- 然後 create window
- 設context
- 確認keycallback 在這裡我們用到"ESC"
- load shader
- add_obj by "tiny_obj_loader"
- 產生VBO、VAO 然後bindbuffer
- 開始render~~~
- set the camera matrix
- 可以參考以下網站~
- bind VAO
- set translate and rotate matrix
- draw objects~~~
- unbind VAO
- 關視窗