Projection matrix for 'Angled' display?

Started by
12 comments, last by FReY 19 years, 6 months ago
Isn't this what the parameters in glFrustum is used for?
I think you just need to work out where the corners of the viewport intersects the nearplane and it should just work. The transform that pops out is in the glFrustum docs.

-Morten-
Advertisement
I'm afraid that wouldn't work; considering that the eye position has x,y,z coordinates relative to the screen. But thanks.. ;)

Any other ideas? I just don't have the knowledge to derive my own matrix for this..
Did you try the matrix I suggested? It's trivial to extend so it skews along the z-axis as well, but that's not what you wan't if I understood your problem correctly.
Morten's glFrustum idea should work...

void glFrustum(
GLdouble left,
GLdouble right,
GLdouble bottom,
GLdouble top,
GLdouble znear,
GLdouble zfar
);

Use this instead of your gluPerspective on your PROJECTION matrix. Just offset the left, right, bottom and top parameters according to your monitor position...

do unto others... and then run like hell.

This topic is closed to new replies.

Advertisement