Time for action – enquiring on the state of buffers

Follow the given steps:

  1. Open the file ch2_StateMachine.html in the HTML5 browser of your preference.
  2. Scroll down to the initBuffers method. You will see something similar to the following screenshot:
    Time for action – enquiring on the state of buffers
  3. Pay attention to how we use the methods discussed in this section to retrieve and display information about the current state of the buffers.
  4. The information queried by the initBuffer function is shown at the bottom portion of the web page using updateInfo (if you look closely at runWebGLApp code you will see that updateInfo is called right after calling initBuffers).
  5. At the bottom of the web page (scroll ...

Get WebGL Beginner's Guide 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.