We have improved the structure of the code examples in this chapter. As the complexity of our WebGL applications increases, it is wise to have a good, maintainable, and clear design. We have left this section at the end of the chapter so you can use it as a reference when working on the exercises.
Just like in previous exercises, our entry point is the
runWebGLApp function which is called when the page is loaded. There we create an instance of
WebGLApp, as shown in the previous diagram.
This class encapsulates some of the utility functions that were present in our examples in previous chapters. It also declares ...