Summary
In this chapter, we have looked at the four basic elements that are always present in any WebGL application: canvas, objects, lights, and camera.
We have learned how to add an HTML5 canvas to our web page and how to set its ID, width, and height. After that, we have included the code to create a WebGL context. We have seen that WebGL works as a state machine and as such, we can query any of its variables using the getParameter
function.
In the next chapter we will learn how to define, load, and render 3D objects into a WebGL scene.