使用 WebGL 來學習 OpenGL的基礎觀念
1 min readMar 31, 2019
此篇為延續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/
Posted by Ping-Lun Liao at 下午3:00:00
Originally published at yunlinsong.blogspot.com on March 31, 2019.