O'Reilly logo

OpenGL ES 2 for Android by Kevin Brothaler

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

Moving to a Perspective Projection

Before we go into the matrix math behind a perspective projection, let’s examine things at a visual level. In the previous chapter, we used an orthographic projection matrix to compensate for the aspect ratio of the screen by adjusting the width and height of the area that gets transformed into normalized device coordinates.

In the following image, we visualize an orthographic projection as a cube enclosing the entire scene, representing what OpenGL will end up rendering to the viewport and what we’ll be able to see:

images/3D/orthographic.png

Figure 30, The Projected Scene shows the same scene from a different viewpoint:

Figure 30. 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