Web graphics

A Brief History of Web Graphics: Canvas, WebGL

Short bytes: Web graphics have come a long way from the days when images were the only graphics on mostly static pages, to the powerful animation, GPU, and gaming capabilities of WebGL, all powered by 2D and 3D contexts. of the HTML canvas element. Now, the Webkit browser engine has come up with a new low-level web graphics API standard to take advantage of the computing power and hardware acceleration provided by the latest GPU systems.

JThere was a time when standards-based web technologies had only static content. The only graphics that existed before were embedded images. Slowly, new features started rolling out that developers could access through JavaScript. Finally, there was sufficient demand for a fully programmable graphics API, so that scripts could create images on the fly. The canvas element and its 2D rendering API were born inside Webkit and therefore WebKit-based browsers.

Most desktop games have started to take advantage of GPUs to improve 3D performance. Thus, the demand for high-performance 3D graphics in browsers has arisen. This led Mozilla and Opera to show some initial experiments that exposed a 3D rendering context from the HTML canvas element. They were so fascinating that the community decided to come together to standardize something that every browser could implement.

All browsers worked together to create WebGL, the standard for rendering 3D graphics on the web. It was based on OpenGL ES, a cross-platform API for graphics for embedded systems. It was perhaps one of the smoothest standardization processes in web history because, thankfully, all browsers were running on systems that supported OpenGL.

WebGL unleashed the power of GPUs for developers on an open web platform, and all major browsers support it, enabling console-quality games to be created for the web and communities like the three library .js to thrive. Since then, WebGL has evolved into WebGL 2, and all major browser engines have committed to supporting it.

For quite some time, there have been low-level graphics APIs like Microsoft’s Direct3D and Apple’s Metal that take advantage of improved GPU technology. Their APIs were created to better reflect modern GPU designs and are built on a very low level abstraction. Due to their reduced overhead, they generally offer better performance than OpenGL. Unfortunately, as you might have guessed, they’re not cross-platform.

In order to allow Web Graphics to take advantage of new and diverse GPU computing technologies, Webkit recently proposed a standard API that would expose modern low-level technology capable of accelerating graphics and computing. The new API would also be compatible with emerging web standards such as WebAssembly and WebVR. As well, GPU for the Web The community group was opened to members to advance development openly and by the best people in the industry.

Read also : 10 reasons why you should learn JavaScript