Jump to content
  • Advertisement
Sign in to follow this  
kjohnstone

OpenGL Projection matrix for 'Angled' display?

This topic is 5432 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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-

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!