ngunha02
ngunha02

Reputation: 1729

Model View Matrix * Projection Matrix

I am learning OpenGl for Android. The tutorial on this site: http://www.learnopengles.com/android-lesson-one-getting-started/#comment-1959, it take model matrix times view matrix and times projection matrix in order to display it on the normalized device coordinate. However, in the book "OpenGL ES2 for Android", chapter 3, it only take mode matrix * projection matrix. So my question is: is it neccessary to need 3 matrices, if not, in which case do i use model and projection, which case do i use model view projection?

Upvotes: 1

Views: 1014

Answers (2)

matthewrdev
matthewrdev

Reputation: 12170

In general you use a view matrix when you want to include a camera into your scene that can move and look around.

Therefore the view matrix is used to represent the location and orientation of a camera in your 3d world. It is used to transform objects in your 3d world from "world space" (the exact location and rotation of objects) into "camera space" (the location and rotation of objects as they appear to the camera).

Upvotes: 2

Reshurum
Reshurum

Reputation: 98

It is necessary if you plan to move a "camera" around the world because transforming the view matrix moves the entire world.

Upvotes: 1

Related Questions