Just define a camera :
Code:
struct Camera_t
{
Vec3_t vPos;
Vec3_t vAngle;
};
Whenever the player walks, change the camera (player) position accordingly, whenever he looks around, change the camera's angle accordingly.
Then, when you're going to render, make a camera (view) matrix with rotation (-vAngle.x,-vAngle.y,-vAngle.z) and translation (-vPos.x,-vPos.y,-vPos.z).
This makes sense :
When the player moves forward : The world moves backward
When the player looks right : The world rotates to his left
That's why you negate things.
Multiply this matrix by the world coordinates of any object to get aligned coordinates (coordinates in the camera space), then by the projection matrix to get the final screen coordinates.