Jim Helman (jimh++at++surreal)
Tue, 25 Jan 94 10:28:20 -0800
pfChanViewMat only provides an eyepoint and orientation. It says
nothing about the projection matrix. You can set up your own
projection matrix in the channel draw callback by calling the GL
window command directly. However, you also have to change your
culling frustum, which in 1.0/1.1 must be syummetric, so that it
includes the off-axis one. You can do this by changing the
orientation and symmetric FOV of the pfChannel.
Here's what the matrix stack looks like in 1.0/1.1 when your
channel draw callback is invoked:
window(winLeft, winRight, winBottom, winTop, near, far);
mmode(MVIEWING);
pfMatrix invViewMatrix;
pfInvertOrthoNMat(invViewMatrix, viewMatrix);
loadmatrix(ident);
rot(-90, 'x'); // Convert from GL Z-out, Y-up to viskit
// Y-in, Z-up.
multmatrix(invViewMatrix);
1.2 supports off-axis frusta, so you won't need to hack the stack.
rgds,
-jim helman
jimh++at++surreal.asd.sgi.com
415/390-1151
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:09 PDT