I am a newbie in computer graphics and Opengl.
I am doing a work for my university and I need to calculate a projection matrix containing the model view projection and the texture viewport transformation.
I am stucked for some days, I already googled and in this article http://developer.nvidia.com/attach/6549
I found this formula that I think that may help me:
Te=|1/2 0 0 1/2| Pp Vp Ve^-1
|1/2 0 0 1/2|
|0 1/2 0 1/2|
|0 0 1/2 1/2|
where: Vp is the view matrix for the projector, Pp is the projection matrix and Ve^-1 is the inverse of camera (or eye).
(is it right?)
I couldn’t understand where the viewport fits here.
Also, I don’t know how to build these three matrices (Pp, Vp, Ve^-1), I have this data stored as variables:
vectors for eye,target,up;
floats for znear,zfar,fovy,aspect;
can anyone help me please? I am really stuck and I don’t know where to look for some answer or what else search in google.
Also, I found this website about the view matrix: http://www.toymaker.info/Games/html/camera.html
but I think it doesn’t apply for Opengl.