ABSTRACT

WebGL is a powerful tool from a web development perspective, providing a gateway to GPU-accelerated 3D graphics through a JavaScript API. Developers can author their applications once and expect them to run across a wide variety of hardware, both mobile and desktop, with the full assistance of the GPU. It is no simple task to support such a system seamlessly, removing the need for WebGL applications to handle differences in operating system, browser, GPU, or available driver. While applications don’t need to handle these differences themselves, being familiar with the ways in which WebGL calls are validated, modified, translated, and finally issued to the hardware provides developers with the tools to create efficient WebGL applications across implementations and platforms. In this chapter, we discuss ANGLE, an open-source project used by several browsers as part of this seamless multi-platform support, and cover some tools and best practices developers can exercise to ensure WebGL applications perform as expected, everywhere. We conclude with helpful tips on examining the translated shader output generated by ANGLE and building and debugging ANGLE itself as a stand-alone library or as part of the Chrome browser.