title: How to create a 2D "perspective"/trapezoid view in OpenGL?
body: <p>Drawing a 2D view in OpenGL is simple: just use <code>GLOrtho</code>.  But as far as I can tell, that will always give you a rectangular view.  But what if you want a slightly more sophisticated perspective?</p>
  
  <p>Assume that I've got a map that's significantly larger than my viewport, and I want to draw it to a perspective trapezoid view where the bottom (near) side is narrower than the far side.  But I still want everything to be 2D.</p>
  
  <p>How do I set up the viewport to display that way, ideally without having to change my actual drawing code any?  I'd like to be able to just set a new viewport and then draw everything to the same coordinates and have OpenGL work out the perspective view.</p>
  
  <p>A basic illustration of the type of effect I'm looking for:  Final Fantasy 4's airship view</p>
  
  <p><img src="https://i.stack.imgur.com/4lrgd.png" alt="FF4 airship view"></p>
  
  <p>Anyone know how to set that up?  Let's say, just for the sake of throwing some numbers out there, that my basic viewport is 800x600, and I'd like the trapezoid view to display the same 800 pixels along the bottom but 1200 along the top.</p>