images

Chapter 7

Beginning WebGL

WebGL (Web-based Graphics Language) is a very exciting new technology that leverages the power of the Graphics Processing Unit (GPU) within the browser.

In this chapter, we will discuss the history and capabilities of WebGL. As a prerequisite to programming games with WebGL, we need to cover the following:

  • checking for WebGL support
  • working within a 3D coordinate system
  • the WebGL graphics pipeline and GLSL (GL Shading Language) basics
  • using buffers and drawing basic shapes
  • setting up world view and projection matrices
  • animating a 3D object
  • enabling depth testing
  • using a texture

Near the end of the chapter, we will ...

Get HTML5 Games Most Wanted: Build the Best HTML5 Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.