O'Reilly logo

WebGL Beginner's Guide by Brandon Jones, Diego Cantor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — rendering modes

Follow the given steps:

  1. Open the file ch_RenderingModes.html in the HTML5 browser of your preference. This example follows the same structure as discussed in the previous section.
  2. Select the WebGL JS button and scroll down to the initBuffer function.
  3. You will see here that we are drawing a trapezoid. However, on screen you will see two triangles! We will see how we did this later.
  4. At the bottom of the page, there is a combobox that allows you to select the different rendering modes that WebGL provides, as shown in the following screenshot:
    Time for action — rendering modes
  5. When you select any option from this combobox, you are changing the value of the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required