Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenGL: Mix orthographic and perspective projection

I want to mix a perspective and orthographic view, but I can't get it to work.

I want X and Y coordinates to be orthographic and Z perspective. For clarification I added a sketch of the desired transformation from OpenGL coordinates to screen display:

sketch of desired view

(I started from a tutorial, but couldn't find how to get values top, bottom, etc.)

like image 658
hardmooth Avatar asked Nov 13 '13 15:11

hardmooth


1 Answers

What you've drawn is simply perspective, not a mix. You just have to make sure that the viewing direction is parallel to the z axis to make the front and back faces of the box stay rectangular.

like image 134
JWWalker Avatar answered Nov 15 '22 09:11

JWWalker