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

The Math Behind Perspective Projections

Perspective projections work somewhat differently. They also map part of the virtual world onto the screen, but they do so by using perspective: the further away something is, the smaller it will appear on the screen. The projection matrix can’t do this by itself, so it uses a fourth component, w, in conjunction with the perspective divide. You can read more in Perspective Division.

The following is a very basic perspective projection matrix. This matrix assumes a right-handed coordinate space (see Left-Handed and Right-Handed Coordinate Systems), with the near plane beginning at a z of -1. As a quick exercise, see if you can guess where the far end lies, remembering that OpenGL will divide each component ...

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