- 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.
- Learning SQL Server Reporting Services 2012
- FPGA從入門到精通(實(shí)戰(zhàn)篇)
- 施耐德SoMachine控制器應(yīng)用及編程指南
- Learning Stencyl 3.x Game Development Beginner's Guide
- 分布式系統(tǒng)與一致性
- CC2530單片機(jī)技術(shù)與應(yīng)用
- 計(jì)算機(jī)組裝維修與外設(shè)配置(高等職業(yè)院校教改示范教材·計(jì)算機(jī)系列)
- Wireframing Essentials
- 新編電腦組裝與硬件維修從入門到精通
- STM32自學(xué)筆記
- Istio實(shí)戰(zhàn)指南
- 筆記本電腦維修技能實(shí)訓(xùn)
- USB應(yīng)用開發(fā)寶典
- 微服務(wù)架構(gòu)實(shí)戰(zhàn):基于Spring Boot、Spring Cloud、Docker
- 數(shù)據(jù)恢復(fù)與硬盤修理