- Hands-On Game Development with WebAssembly
- Rick Battagline
- 213字
- 2021-06-24 13:41:03
WebGL and canvas contexts
WebGL is a rendering context for drawing to the HTML5 element, and is an alternative to the 2D rendering context. Often, when someone mentions the canvas, they are referring to the 2D rendering context, which is accessed by calling getContext and passing in the string 2d. Both contexts are methods of rendering to the HTML5 canvas element. A context is a type of API for immediate mode rendering. Two different WebGL contexts can be requested, both of which provide access to different versions of the WebGL API. These contexts are webgl and webgl2. In the following examples, I will be using the webgl context and will be using the WebGL 1.0 API. There is also a rarely used context for rendering a bitmap to the canvas that we can access by passing in bitmaprenderer as a string value.
In the next section, I will introduce you to shaders and the GLSL shader language.
- Intel FPGA/CPLD設計(基礎篇)
- 圖解西門子S7-200系列PLC入門
- Getting Started with Qt 5
- 計算機應用與維護基礎教程
- 嵌入式系統中的模擬電路設計
- 筆記本電腦應用技巧
- BeagleBone Robotic Projects
- VMware Workstation:No Experience Necessary
- Spring Cloud微服務和分布式系統實踐
- RISC-V處理器與片上系統設計:基于FPGA與云平臺的實驗教程
- 新編電腦組裝與硬件維修從入門到精通
- Istio實戰指南
- 微服務架構基礎(Spring Boot+Spring Cloud+Docker)
- The Reinforcement Learning Workshop
- 筆記本電腦的結構、原理與維修