Well, you should probably change that.

The transformation chain typically looks like:

projection * view * model

where the view transformation is the inverse of the camera transformation (i.e. the transformation you would use if the camera was an object).

Historically, the way that the view transformation was handled was to concatenate inverse transformations in the reverse order:

(A.B)-1 = B-1.A-1.

So if the camera was at <x,y,z> with a heading of h and an elevation of e, you’d use something like:

```
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glRotatef(-e,1,0,0);
glRotatef(-h,0,0,1);
glTranslatef(-x,-y,-z);
```

But I’d suggest that you’re better off simply constructing a camera transformation using GLM, inverting it, then (assuming that you’re using the fixed-function pipeline) using glLoadMatrix() to initialise the model-view matrix to the inverse of the camera transformation.

If you have an actual (non-inverted) camera transformation, then the camera’s world-space position is simply the result of transforming the vector [0,0,0,1] by the camera transformation (i.e. the right-hand column of the matrix).

If you’re desperate to avoid the use of GLM (or any other matrix code), you can use gluUnProject() with the projection matrix set to any symmetric orthographic projection (e.g. an identity matrix) to un-project a point at the centre of the viewport and with a Z coordinate of 0. IOW, un-project the eye position.