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 — working on the wall

  1. Open the file ch3_Wall.html in your HTML5 browse. You will see something similar to the following screenshot:
    Time for action — working on the wall
  2. Now, open the file again, this time in your favorite text editor (for example, Notepad ++).
  3. Go to the vertex shader (Hint: look for the tag<script id="shader-vs" type="x-shader/x-vertex">). Make sure that you identify the attributes uniforms and varyings that are declared there.
  4. Now go to the fragment shader. Notice that there are no attributes here (Remember: attributes are exclusive of the vertex shader).
  5. Go to the runWebGLApp function. Verify that we are calling initProgram and initLights there.
  6. Go to ...

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