Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Where should my camera go, the ModelView or Projection matrix?

0
Posted

Where should my camera go, the ModelView or Projection matrix?

0

The GL_PROJECTION matrix should contain only the projection transformation calls it needs to transform eye space coordinates into clip coordinates. The GL_MODELVIEW matrix, as its name implies, should contain modeling and viewing transformations, which transform object space coordinates into eye space coordinates. Remember to place the camera transformations on the GL_MODELVIEW matrix and never on the GL_PROJECTION matrix. Think of the projection matrix as describing the attributes of your camera, such as field of view, focal length, fish eye lens, etc. Think of the ModelView matrix as where you stand with the camera and the direction you point it. The game dev FAQ has good information on these two matrices. Read Steve Baker’s article on projection abuse ( local mirror ). This article is highly recommended and well-written. It’s helped several new OpenGL programmers.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123