在引入 WebGL 之前,网站上的图形是如何呈现的?

How were graphics rendered on websites before the introduction of WebGL?

WebGL 是一个 API,它允许网站利用 GPU 的强大功能,对吧?那么在引入 WebGL 之前,高图形网站是如何呈现的?

在 WebGL 之前存在并且现在仍然是 the Canvas 2D api 和 SVG。否则还有 Flash 和服务器端渲染。

Canvas 2D api 和 SVG 仍在大量使用,并且在某些用例中比 WebGL 有很多优势。特别是它们可以说更容易用于它们所加速的东西,并且还被用于实现简单的软件渲染 3D 图形。

Flash 具有名为 Stage3D toward the end of its life but not all PCs at the time had reasonable GPU acceleration. In 2020 it's common to have a machine with a GPU that can run WebGL. In 2011 when WebGL shipped it was still common for many users to not have WebGL capable machines. Silverlight also had some GPU acceleration. In 2009 Google tried shipping a browser GPU plugin called O3D 的 GPU 加速图形。

一般来说,虽然 GPU 加速图形在 WebGL 之前在网络上并不常见。