使用 WebGL 來學習 OpenGL的基礎觀念
若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 此篇為延續 OpenGL 入門筆記 一文。這幾天在學習OpenGL時,因為在建立開發環境上,會根據不同的作業系統以及IDE工具來設定,步驟繁瑣,於是筆者就看到了 WebGL 。透過有支援WebGL的瀏覽器以及線上IDE(例如 CodePen 等),可以很輕鬆地建立起開發環境,以快速來學習OpenGL的觀念。 此外Mozilla開發者網站也有提供教學[1],此教學的內容大綱如下: Getting started with WebGL Adding 2D content to a WebGL context Using shaders to apply color in WebGL Animating objects with WebGL Creating 3D objects using WebGL Using textures in WebGL Lighting in WebGL Animating textures in WebGL 而 WebGL2 Fundamentals 也提供了非常豐富的教學資源,以及互動式的程式範例(見下圖) Happy OpenGL programming!!! 參考資料: [1] https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Tutorial [2] https://webgl2fundamentals.org/