Chapter 2
The Basics of OpenGL and Jogl
The step from two dimensions to three dimensions in computer graphics is a big one. Three-dimensional objects are harder to visualize than two, and three-dimensional transformations take some getting used to. Three-dimensional scenes have to be projected down onto a two-dimensional surface to be viewed, and that introduces its own complexities.
Furthermore, there is the problem that realistic 3D scenes require the effects of lighting to make them appear three-dimensional to the eye. Without these effects, the eye sees only flat patches of color. To simulate lighting in 3D computer graphics, you have to know what light sources illuminate the scene, and you have to understand how the light from those sources interacts with the surface material of the objects in the scene.
As we pursue our study of OpenGL, we will cover all of this and more. We will start in this chapter with an overview that will allow you to use OpenGL to create fairly complex 3D scenes. In later chapters, we will cover more of the details and advanced features of OpenGL, and we will consider the general theory of 3D graphics in more depth.
Contents of Chapter 2:
- Section 1: Basic OpenGL 2D Programs
- Section 2: Into the Third Dimension
- Section 3: Drawing in 3D
- Section 4: Normals and Textures